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.



196
197
198
# File 'lib/rails/application/configuration.rb', line 196

def initialize
  @configurations = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



200
201
202
203
204
205
206
207
208
# File 'lib/rails/application/configuration.rb', line 200

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)


210
211
212
# File 'lib/rails/application/configuration.rb', line 210

def respond_to_missing?(symbol, *)
  true
end