123456789_123456789_123456789_123456789_123456789_

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

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: railties/lib/rails/application/configuration.rb

Class Method Summary

Instance Method Summary

Constructor Details

.newCustom

[ GitHub ]

  
# File 'railties/lib/rails/application/configuration.rb', line 600

def initialize
  @configurations = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args)

[ GitHub ]

  
# File 'railties/lib/rails/application/configuration.rb', line 604

def method_missing(method, *args)
  if method.end_with?("=")
    @configurations[:"#{method[0..-2]}"] = args.first
  elsif args.empty?
    @configurations.fetch(method) {
      @configurations[method] = ActiveSupport::OrderedOptions.new
    }
  else
    raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 0) when reading configuration `#{method}`"
  end
end

Instance Method Details

#respond_to_missing?(symbol, _) ⇒ Boolean

[ GitHub ]

  
# File 'railties/lib/rails/application/configuration.rb', line 616

def respond_to_missing?(symbol, _)
  true
end