Created
March 8, 2013 20:31
-
-
Save chrisb/5119612 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
require 'rubygems' | |
require 'active_support/all' | |
class MyEngine < Object | |
class Configuration | |
include ActiveSupport::Configurable | |
def self.method_missing(meth, *args) | |
self.config.send meth, *args | |
end | |
end | |
end | |
class MyEngine::Configuration | |
config.something_else = 'else' | |
end | |
MyEngine::Configuration.something = 'something' | |
puts MyEngine::Configuration.something | |
puts MyEngine::Configuration.something_else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment