Class: TotalVoice::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/query.rb

Instance Method Summary collapse

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_queryObject

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