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.



334
335
336
# File 'lib/rails/application/configuration.rb', line 334

def initialize
  @configurations = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



338
339
340
341
342
343
344
345
346
# File 'lib/rails/application/configuration.rb', line 338

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)


348
349
350
# File 'lib/rails/application/configuration.rb', line 348

def respond_to_missing?(symbol, *)
  true
end