-
-
Save pschyska/2011450 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base | |
attr_accessor_with_default :config, OrderedOptions.new | |
def initialize passed, parent | |
# how do we handle class_level default config and delegatestodsl config in a way that it's overridable by the user? | |
@config.merge! passed | |
end | |
def js_config | |
@config.reject { | |
# reject server_sider_config | |
}.to_nifty_json | |
end | |
class CustomComponent < Base | |
title "Blah" | |
def initialize passed, parent | |
@config.model = "Foo' | |
super | |
apply_persistent_config | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment