Skip to content

Instantly share code, notes, and snippets.

@chrisb
Created March 8, 2013 20:31
Show Gist options
  • Save chrisb/5119612 to your computer and use it in GitHub Desktop.
Save chrisb/5119612 to your computer and use it in GitHub Desktop.
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