Module: Dragonfly::Configurable

Defined in:
lib/dragonfly/configurable.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: BadConfigAttribute, ConfigurationProxy, DeferredBlock, NotConfigured

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dragonfly/configurable.rb', line 8

def self.included(klass)
  klass.class_eval do
    include Configurable::InstanceMethods
    extend Configurable::ClassMethods

    # We should use configured_class rather than self.class
    # because sometimes this will be the eigenclass of an object
    # e.g. if we configure a module, etc.
    define_method :configured_class do
      klass
    end
  end
end