Class: Lol::StaticRequest::Proxy

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

Instance Method Summary collapse

Constructor Details

#initialize(request, endpoint) ⇒ Proxy

Returns a new instance of Proxy.


75
76
77
78
# File 'lib/lol/static_request.rb', line 75

def initialize(request, endpoint)
  @request = request
  @endpoint = endpoint
end

Instance Method Details

#get(id = nil, params = {}) ⇒ Object


80
81
82
83
84
85
86
87
# File 'lib/lol/static_request.rb', line 80

def get(id=nil, params={})
  if id.is_a?(Hash)
    params = id
    id = nil
  end

  @request.get @endpoint, id, params
end