Class: Hash

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

Overview

ActiveSupport Like object#to_query methods =========================

Instance Method Summary collapse

Instance Method Details

#to_query(namespace = nil) ⇒ Object



105
106
107
108
109
# File 'lib/http_requestor.rb', line 105

def to_query(namespace = nil)
  collect do |key, value|
    value.to_query(namespace ? "#{namespace}[#{key}]" : key)
  end.sort * '&'
end