Class: ActiveInteractor::Context::Output
- Inherits:
-
Base
- Object
- Base
- ActiveInteractor::Context::Output
show all
- Defined in:
- lib/active_interactor/context/output.rb
Instance Attribute Summary
Attributes inherited from Base
#errors
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #validate!
#[], #[]=
#read_attribute_for_validation
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class ActiveInteractor::Context::AttributeAssignment
Class Method Details
.field_names ⇒ Object
12
13
14
|
# File 'lib/active_interactor/context/output.rb', line 12
def self.field_names
attribute_set.attribute_names
end
|
.fields ⇒ Object
16
17
18
|
# File 'lib/active_interactor/context/output.rb', line 16
def self.fields
attribute_set.attributes
end
|
.returns(*attribute_args) ⇒ Object
8
9
10
|
# File 'lib/active_interactor/context/output.rb', line 8
def self.returns(*attribute_args)
attribute_set.add(*attribute_args)
end
|
Instance Method Details
#fields ⇒ Object
20
21
22
23
24
|
# File 'lib/active_interactor/context/output.rb', line 20
def fields
attribute_set.attributes.each_with_object({}) do |attribute, result|
result[attribute.name] = attribute.value
end
end
|