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

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeCustom

Returns a new instance of Custom.



363
364
365
# File 'railties/lib/rails/application/configuration.rb', line 363

def initialize
  @configurations = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



367
368
369
370
371
372
373
374
375
# File 'railties/lib/rails/application/configuration.rb', line 367

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)


377
378
379
# File 'railties/lib/rails/application/configuration.rb', line 377

def respond_to_missing?(symbol, *)
  true
end