Class: CFoundry::V2::ModelMagic::QueryValueHelper::QueryMultiValue
- Inherits:
-
Object
- Object
- CFoundry::V2::ModelMagic::QueryValueHelper::QueryMultiValue
- Defined in:
- lib/cfoundry/v2/model_magic/query_multi_value_helper.rb
Instance Attribute Summary collapse
-
#query_values ⇒ Object
Returns the value of attribute query_values.
Instance Method Summary collapse
- #collect_values(key) ⇒ Object
-
#initialize(*query_hashes) ⇒ QueryMultiValue
constructor
A new instance of QueryMultiValue.
Constructor Details
#initialize(*query_hashes) ⇒ QueryMultiValue
Returns a new instance of QueryMultiValue.
7 8 9 10 11 |
# File 'lib/cfoundry/v2/model_magic/query_multi_value_helper.rb', line 7 def initialize(*query_hashes) self.query_values = query_hashes.collect do |query_hash| QueryValue.new query_hash end end |
Instance Attribute Details
#query_values ⇒ Object
Returns the value of attribute query_values.
5 6 7 |
# File 'lib/cfoundry/v2/model_magic/query_multi_value_helper.rb', line 5 def query_values @query_values end |
Instance Method Details
#collect_values(key) ⇒ Object
13 14 15 16 17 |
# File 'lib/cfoundry/v2/model_magic/query_multi_value_helper.rb', line 13 def collect_values(key) query_values.collect do |value| "#{key}#{value}" end.join(';') end |