Module: ActiveInteractor::Configurable::ClassMethods Private
- Defined in:
- lib/active_interactor/configurable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Configurable object class methods. Because ClassMethods is a module classes should extend ClassMethods rather than inherit from it.
Instance Method Summary collapse
-
#defaults(options = {}) ⇒ Hash{Symbol=>*}
private
Get or Set the default attributes for a ActiveInteractor::Configurable class.
Instance Method Details
#defaults(options = {}) ⇒ Hash{Symbol=>*}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get or Set the default attributes for a ActiveInteractor::Configurable class. This method will create an attr_accessor
on
the configurable class as well as set a default value for the attribute.
29 30 31 32 33 34 35 36 |
# File 'lib/active_interactor/configurable.rb', line 29 def defaults( = {}) return __defaults if .empty? .each do |key, value| __defaults[key.to_sym] = value send(:attr_accessor, key.to_sym) end end |