class OverwatchLeague::URL
Public Class Methods
new(path, params: {})
click to toggle source
# File lib/overwatch_league/url.rb, line 5 def initialize(path, params: {}) @path = path @params = params end
Public Instance Methods
to_str()
click to toggle source
# File lib/overwatch_league/url.rb, line 10 def to_str String.new.tap do |url| url << @path url << '?' + URI.encode_www_form(@params) unless @params.empty? end end