Class: ActiveInteraction::Input
- Inherits:
-
Object
- Object
- ActiveInteraction::Input
- Defined in:
- lib/active_interaction/input.rb
Overview
Represents a processed input.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
The processed input value.
Instance Method Summary collapse
-
#errors ⇒ Filter::Error
Any errors that occurred during processing.
-
#initialize(filter, value: nil, error: nil) ⇒ Input
constructor
A new instance of Input.
Constructor Details
#initialize(filter, value: nil, error: nil) ⇒ Input
Returns a new instance of Input.
7 8 9 10 11 |
# File 'lib/active_interaction/input.rb', line 7 def initialize(filter, value: nil, error: nil) @filter = filter @value = value @error = error end |
Instance Attribute Details
#value ⇒ Object (readonly)
The processed input value.
14 15 16 |
# File 'lib/active_interaction/input.rb', line 14 def value @value end |
Instance Method Details
#errors ⇒ Filter::Error
Any errors that occurred during processing.
19 20 21 |
# File 'lib/active_interaction/input.rb', line 19 def errors @errors ||= Array(@error) end |