Closed roryokane closed 10 years ago
Thanks, and apologies for overlooking this! I've slightly rephrased your suggested copy in fac7021fbc3cccad4d2fb47cbaa1a5529ce86d90; if that isn't clear, just let me know.
map(:center, 80) is a syntax error in normal Ruby.
I think you might be confused by what a "syntax error" is :-). This is a valid Ruby parse.
@vendethiel You are right. I guess I should have said that that code “raises an exception” instead.
The README never explains exactly how to write the code that is the first argument of
ru
. The argument looks like Ruby, but it is obviously not just a line of Ruby code –map(:center, 80)
is a syntax error in normal Ruby.When I saw your examples, I was trying to figure out how to write the code, and how the input is passed into the code, but I couldn’t see it. I wondered if the
:
was transformed into something else, but didn’t see a way for that to work. I thought, “okay, I’ll wait until the Usage section – that is sure to explain it”. But that didn’t explain it either, nor did the rest of the README. Only after examining the examples and thinking about them for a few minutes did I figure out how I was supposed to write the argument.Here are my guesses as to how the code argument is executed. You should add something like this to the README’s Usage section:
If the actual transformation is different in a way that affects the user, you should change that description.
It may also help to summarize these rules in the Overview section, if summarization is possible, so that people can better understand the examples you present there.