Class: TotalVoice::Query
- Inherits:
-
Object
- Object
- TotalVoice::Query
- Defined in:
- lib/query.rb
Instance Method Summary collapse
-
#initialize(values) ⇒ Query
constructor
-
Args : -
values
-> Array com valores para montar a Query String.
-
-
#to_query ⇒ Object
Monta a Query String.
Constructor Details
#initialize(values) ⇒ Query
-
Args :
-
values
-> Array com valores para montar a Query String
-
7 8 9 |
# File 'lib/query.rb', line 7 def initialize(values) @values = values end |
Instance Method Details
#to_query ⇒ Object
Monta a Query String
14 15 16 |
# File 'lib/query.rb', line 14 def to_query() @query = "?" + @values.map{|k,v| "#{k}=#{v}"}.join('&') end |