Class: Rlocu::QueryBuilder::QueryCondition
- Inherits:
-
Object
- Object
- Rlocu::QueryBuilder::QueryCondition
- Defined in:
- lib/rlocu/query_builder.rb
Instance Attribute Summary collapse
-
#key_value_conditions ⇒ Object
readonly
Returns the value of attribute key_value_conditions.
Instance Method Summary collapse
-
#initialize(key_value_conditions:) ⇒ QueryCondition
constructor
A new instance of QueryCondition.
- #to_h ⇒ Object
Constructor Details
#initialize(key_value_conditions:) ⇒ QueryCondition
Returns a new instance of QueryCondition.
9 10 11 |
# File 'lib/rlocu/query_builder.rb', line 9 def initialize(key_value_conditions:) @key_value_conditions = key_value_conditions end |
Instance Attribute Details
#key_value_conditions ⇒ Object (readonly)
Returns the value of attribute key_value_conditions.
8 9 10 |
# File 'lib/rlocu/query_builder.rb', line 8 def key_value_conditions @key_value_conditions end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 |
# File 'lib/rlocu/query_builder.rb', line 13 def to_h h = {} key_value_conditions.each { |condition| h.merge!(condition.to_h) } h end |