Open abinoam opened 9 years ago
I think we could just use input and output as their core to HighLine class. Perhaps use an additional and optional *options hash parameter and fetch from it.
Another option might be to use keyword parameters for everything.
When I was trying to "fix" yard I thought about that this behaviour shouldn't be tied into "requiring an specific file" rather it should be tied to "including module to add additional funcionality"
This sounds very wise to me.
Growing the todo list. HighLine.find_or_create_style_list doesn't check if the compound styles are valid styles. Well, The whole styling thing is a little hard. Perhaps we should make a new api for the styles and for the "rendering" of the strings with such styles. But... for while, just taking this note for future review.
@abinoam I agree with @JEG2 that the behavior to be tied to a module rather than a require.
Thanks for your input @djberg96 I would appreciate any more comment, so feel free to write them! 👍
Well,
I have already heard about documentation driven development.... I will not try to do that, but I can't deny that as I try to write more documentation or fix the current one some things naturally come to mind about HighLine. I'll write them here to keep track of them and to discuss with anybody interested.
There's too much parameters at the constructor signature of Highline
I think we could just use input and output as their core to HighLine class. Perhaps use an additional and optional *options hash parameter and fetch from it. Yield self to get more parameters? I don't see any use of this.
Change
require 'highline/import'
to somethiginclude HighLine
to give direct access to ask and sayAs I tried to document this behaviour properly with yard I saw that the comments sticked to the next class definition. In the case was Kernel.
So it didn't make much sense. When I was trying to "fix" yard I thought about that this behaviour shouldn't be tied into "requiring an specific file" rather it should be tied to "including module to add additional funcionality"
Any comments, suggestions, etc?
I'll add more "tasks" as I progress with the docs.
cc: @JEG2 , @matugm, @djberg96,@practicingruby