module NicoQuery::Core::Base
Public Instance Methods
get()
click to toggle source
# File lib/nicoquery/core/base.rb, line 28 def get http_client = NicoQuery::Core::HttpClient.instance http_client.set_params uri.to_s http_client.get end
params()
click to toggle source
# File lib/nicoquery/core/base.rb, line 11 def params @params_array.join('&') end
path()
click to toggle source
# File lib/nicoquery/core/base.rb, line 15 def path if @dynamic_segment.present? static_segment + '/' + @dynamic_segment else static_segment end end
scheme()
click to toggle source
# File lib/nicoquery/core/base.rb, line 7 def scheme 'http' end
uri()
click to toggle source
# File lib/nicoquery/core/base.rb, line 23 def uri _uri = scheme + "://" + [ ([host, path].join('/')), params].join('?') URI.escape _uri end