Created
November 9, 2009 08:33
-
-
Save hassox/229788 to your computer and use it in GitHub Desktop.
This file contains 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
##### Configuration Example | |
MyStack.configuration do | |
default :page_title, "Awesome!" | |
default :home_url, :home | |
default :use_live_resource lambda{ _use_live_resource? } | |
def _use_live_resource? | |
Pancake.env != "development" | |
end | |
end | |
MyStack.configuration.page_title #=> "Awesome!" | |
MyStack.configuration.page_title = "Cool!" | |
MyStack.configuration.page_title #=> "Cool!" | |
MyStack.configuration.some_unkown_value #=> nil | |
MyStack.configuraiton.some_unknown_value = "foo" | |
MyStack.configuration.some_unknown_value #=> "foo" | |
class ChildStack < MyStack; end | |
ChildStack.configuration.page_title #=> "Awesome!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment