# File lib/dragonfly/configurable.rb, line 7 def self.included(klass) klass.class_eval do include Configurable::InstanceMethods extend Configurable::ClassMethods # These aren't included in InstanceMethods because we need access to 'klass' # We can't just put them into InstanceMethods and use 'self.class' because # this won't always point to the class in which we've included Configurable, # e.g. if we've included it in an eigenclasse define_method :configuration_hash do @configuration_hash ||= klass.default_configuration.dup end private :configuration_hash define_method :configuration_methods do klass.configuration_methods end end end