Module: ActiveSupport::Configurable::ClassMethods

Defined in:
activesupport/lib/active_support/configurable.rb

Instance Method Summary collapse

Instance Method Details

#configObject



28
29
30
31
32
33
34
35
# File 'activesupport/lib/active_support/configurable.rb', line 28

def config
  @_config ||= if respond_to?(:superclass) && superclass.respond_to?(:config)
    superclass.config.inheritable_copy
  else
    # create a new "anonymous" class that will host the compiled reader methods
    Class.new(Configuration).new
  end
end

#configure {|config| ... } ⇒ Object

Yields:



37
38
39
# File 'activesupport/lib/active_support/configurable.rb', line 37

def configure
  yield config
end