lib/model/prices_url.rb in ns-yapi-0.4.3 vs lib/model/prices_url.rb in ns-yapi-0.4.4

- old
+ new

@@ -3,14 +3,14 @@ def initialize(url) raise InvalidURL, "You must give an url, ie http://www.ns.nl/api" unless url @url = url end - def url (opts = {date: nil, from: "", to: "", date: nil}) + def url (opts = {date: nil, from: "", to: ""}) opts[:date] = opts[:date].strftime("%d%m%Y") if opts[:date] uri = URI.escape(opts.collect{|k,v| "#{k}=#{v}"}.join('&')) "#{@url}?#{uri}" end class InvalidURL < StandardError end -end \ No newline at end of file +end