Class: Rails::Application::Configuration::Custom
- Inherits:
-
Object
- Object
- Rails::Application::Configuration::Custom
- Defined in:
- lib/rails/application/configuration.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize ⇒ Custom
constructor
A new instance of Custom.
- #method_missing(method, *args) ⇒ Object
- #respond_to_missing?(symbol) ⇒ Boolean
Constructor Details
#initialize ⇒ Custom
Returns a new instance of Custom.
196 197 198 |
# File 'lib/rails/application/configuration.rb', line 196 def initialize @configurations = Hash.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
200 201 202 203 204 205 206 207 208 |
# File 'lib/rails/application/configuration.rb', line 200 def method_missing(method, *args) if method =~ /=$/ @configurations[$`.to_sym] = args.first else @configurations.fetch(method) { @configurations[method] = ActiveSupport::OrderedOptions.new } end end |
Instance Method Details
#respond_to_missing?(symbol) ⇒ Boolean
210 211 212 |
# File 'lib/rails/application/configuration.rb', line 210 def respond_to_missing?(symbol, *) true end |