Class: ActiveInteraction::GroupedInput

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/active_interaction/grouped_input.rb

Overview

Holds a group of inputs together for passing from Base to Filters.

Instance Method Summary collapse

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