Module: ActiveInteractor::Context::Attributes::ClassMethods
- Included in:
- Base
- Defined in:
- lib/active_interactor/context/attributes.rb
Overview
Context attribute class methods. Because ClassMethods is a module classes should extend ClassMethods rather than inherit from it.
Instance Method Summary collapse
-
#attributes(*attributes) ⇒ Array<Symbol>
Get or set attributes on a context class.
Instance Method Details
#attributes(*attributes) ⇒ Array<Symbol>
Get or set attributes on a context class
29 30 31 32 33 |
# File 'lib/active_interactor/context/attributes.rb', line 29 def attributes(*attributes) return __attributes if attributes.empty? @__attributes = __attributes.concat(attributes.map(&:to_sym)).compact.uniq.sort end |