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.


356
357
358
# File 'railties/lib/rails/application/configuration.rb', line 356

def initialize
  @configurations = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object


360
361
362
363
364
365
366
367
368
# File 'railties/lib/rails/application/configuration.rb', line 360

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)

370
371
372
# File 'railties/lib/rails/application/configuration.rb', line 370

def respond_to_missing?(symbol, *)
  true
end