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.
387 388 389 |
# File 'lib/rails/application/configuration.rb', line 387 def initialize @configurations = Hash.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
391 392 393 394 395 396 397 398 399 |
# File 'lib/rails/application/configuration.rb', line 391 def method_missing(method, *args) if method.end_with?("=") @configurations[:"#{method[0..-2]}"] = args.first else @configurations.fetch(method) { @configurations[method] = ActiveSupport::OrderedOptions.new } end end |
Instance Method Details
#respond_to_missing?(symbol) ⇒ Boolean
401 402 403 |
# File 'lib/rails/application/configuration.rb', line 401 def respond_to_missing?(symbol, *) true end |