Module: ActiveInteractor::Interactor::Context::ClassMethods Private
- Defined in:
- lib/active_interactor/interactor/context.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.
Instance Method Summary collapse
-
#context_attributes(*attributes) ⇒ Object
private
Assign attributes to the context class of the interactor.
-
#context_class ⇒ Object
private
The context class of the interactor.
-
#inherited(base) ⇒ Object
private
Create the context class for inherited classes.
Instance Method Details
#context_attributes(*attributes) ⇒ Object
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.
Assign attributes to the context class of the interactor
41 42 43 |
# File 'lib/active_interactor/interactor/context.rb', line 41 def context_attributes(*attributes) context_class.attributes = attributes end |
#context_class ⇒ Object
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.
The context class of the interactor
53 54 55 |
# File 'lib/active_interactor/interactor/context.rb', line 53 def context_class const_get 'Context' end |
#inherited(base) ⇒ Object
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.
Create the context class for inherited classes.
27 28 29 |
# File 'lib/active_interactor/interactor/context.rb', line 27 def inherited(base) base.const_set 'Context', Class.new(ActiveInteractor::Context::Base) end |