Class: OpenVidu::Requestor

Inherits:
Object
  • Object
show all
Defined in:
lib/open_vidu/requestor.rb

Overview

Requestor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server, method, endpoint, params = {}) ⇒ Requestor

Returns a new instance of Requestor.



9
10
11
12
13
14
# File 'lib/open_vidu/requestor.rb', line 9

def initialize(server, method, endpoint, params = {})
  @server = server
  @method = method
  @endpoint = endpoint
  @params = params
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



7
8
9
# File 'lib/open_vidu/requestor.rb', line 7

def endpoint
  @endpoint
end

#methodObject (readonly)

Returns the value of attribute method.



7
8
9
# File 'lib/open_vidu/requestor.rb', line 7

def method
  @method
end

#paramsObject (readonly)

Returns the value of attribute params.



7
8
9
# File 'lib/open_vidu/requestor.rb', line 7

def params
  @params
end

#serverObject (readonly)

Returns the value of attribute server.



7
8
9
# File 'lib/open_vidu/requestor.rb', line 7

def server
  @server
end

Instance Method Details

#executeObject



16
17
18
# File 'lib/open_vidu/requestor.rb', line 16

def execute
  HTTParty.send(method, url, options)
end