Method: ActiveInteractor::Interactor::Context::ClassMethods#context_attributes

Defined in:
lib/active_interactor/interactor/context.rb

#context_attributes(*attributes) ⇒ Object

Call .attributes on the interactor class' context class

Examples:

class MyInteractor < ActiveInteractor::Base
  context_attributes :first_name, :last_name
end

MyInteractor.context_class.attributes
#=> [:first_name, :last_name]

Since:

  • 0.1.0



42
# File 'lib/active_interactor/interactor/context.rb', line 42

delegate :attributes, :attribute_missing, :respond_to_without_attributes?, to: :context_class, prefix: :context