class Dgrid::API::AugmentedURI

Decorates URI::* with a params method that parses the query into a hash of parameters. Frankly this should be in URI::* and I am very tempted to monkey-patch it in there but Erik held me back. :)

Public Class Methods

new(url_string) click to toggle source
# File lib/dgrid/api/connection.rb, line 28
def initialize(url_string)
  @delegate = URI.parse(url_string)
end

Public Instance Methods

method_missing(*args, &block) click to toggle source
# File lib/dgrid/api/connection.rb, line 32
def method_missing(*args, &block)
  @delegate.send(*args,&block)
end
params() click to toggle source
# File lib/dgrid/api/connection.rb, line 36
def params
  Hash[ @delegate.query.split('&').map {|x| x.split('=')} ]
end