-
Notifications
You must be signed in to change notification settings - Fork 90
Add background color accessor #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 |
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 ;) |
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. |
I think I will expose it in the newly created |
Ok, let me know if you need any help/review then ;) |
I will do. 😄 |
Yeah, this needs to wait for @maxmeyer's changes, but after that, I'm 👍 with this. |
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 👍 It does more than the js version now. |
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 😢 so here it is!