Class: ActiveInteraction::GroupedInput
- Inherits:
-
Object
- Object
- ActiveInteraction::GroupedInput
- Includes:
- Comparable
- Defined in:
- lib/active_interaction/grouped_input.rb
Overview
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(**data) ⇒ GroupedInput
constructor
A new instance of GroupedInput.
Constructor Details
#initialize(**data) ⇒ GroupedInput
Returns a new instance of GroupedInput.
13 14 15 |
# File 'lib/active_interaction/grouped_input.rb', line 13 def initialize(**data) @data = data end |
Instance Method Details
#<=>(other) ⇒ Object
25 26 27 28 29 |
# File 'lib/active_interaction/grouped_input.rb', line 25 def <=>(other) return nil unless other.is_a?(self.class) data <=> other.data end |
#[](key) ⇒ Object
17 18 19 |
# File 'lib/active_interaction/grouped_input.rb', line 17 def [](key) @data[key] end |
#[]=(key, value) ⇒ Object
21 22 23 |
# File 'lib/active_interaction/grouped_input.rb', line 21 def []=(key, value) @data[key] = value end |