Closed jarthod closed 9 years ago
:thumbsup: Makes sense to me.
@maxmeyer @ttaylorr Is this safe to merge now or should we wait for the current structural changes?
No, it's not safe to merge. It interferes with #40 and #44. It would be best to integrate it with #44. But I like the idea. We should add that functionality. Something like. Furthermore the style of tests will change a lot if @ttaylorr goes with the style introduced in the latest commits of #40.
class Pattern
attr_reader :color
end
If you're planning on merging #40 soon I'll happily rebase this with the new code style ;)
Ok, #40 is merged.
@jarthod Maybe you want to wait a bit. I'm going to refactor the generators and will add a Pattern
-class. This could hold the value you're interested in.
Ok, I was currently looking at the rebase and saw that with the new code I can only easily get the "rgb()" value, which is enough for the usecase I see (fallback for browser) but if we can make this more generic it's even better ;)
BTW is there any reason for the private attr_reader thing ? is it convention ? it looks like instance variable would be fine to me.
I temporarily pushed my changes to the branch. Let me know when I shall rebase again ;)
BTW is there any reason for the private attr_reader thing ? is it convention ? it looks like instance variable would be fine to me.
This makes refactoring a lot of easier. You just need to change the method implementation instead of changing all places where you use the instance variable.
And as the attr*-thing should be not part of the public api of the object I marked them as private.
The point of the feature is to expose the color attribute ;) if you make it private is just won't work. BTW I think you pushed back the un-rebased branch of my work (at least the spec and readme). Maybe I should have to a regular merge, but I just wanted to keep the commits clean ;)
I think I will expose it in the newly created Pattern
-class.
Ok, let me know if you need any help/review then ;)
I will do. :smile:
Yeah, this needs to wait for @maxmeyer's changes, but after that, I'm :+1: with this.
@jarthod
Can you review the current version on master if the new api is helpful for you? See https://github.com/jasonlong/geo_pattern#inspection-of-pattern for a more detailed description on the new api.
Cheers
Are there any other features found on the js version which might be helpful for you as well in the ruby version?
This looks great :+1: It does more than the js version now.
This will be 1.4
I guess ?
I saw this on the js version and it seemed really usefull to me for fallback or styling other element. I was sad to see it wasn't in the ruby version :cry: so here it is!