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
34 35 36 37 38 |
# File 'lib/active_interactor/context/attributes.rb', line 34 def attributes(*attributes) attributes.compact.uniq.each { |attr| attribute(attr) } attribute_names.sort.collect(&:to_sym) end |