Class: Rails::Application::Configuration::Custom

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/application/configuration.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeCustom

Returns a new instance of Custom.



250
251
252
# File 'lib/rails/application/configuration.rb', line 250

def initialize
  @configurations = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



254
255
256
257
258
259
260
261
262
# File 'lib/rails/application/configuration.rb', line 254

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

Returns:

  • (Boolean)


264
265
266
# File 'lib/rails/application/configuration.rb', line 264

def respond_to_missing?(symbol, *)
  true
end