Class: OutlookCalendar::RestCaller

Inherits:
Object
  • Object
show all
Defined in:
lib/outlook_calendar/rest_caller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, url, headers, params = {}) ⇒ RestCaller

Returns a new instance of RestCaller.



5
6
7
8
9
10
# File 'lib/outlook_calendar/rest_caller.rb', line 5

def initialize(method, url, headers, params = {})
  @method = method
  @url = url
  @headers = headers
  @params = params
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



3
4
5
# File 'lib/outlook_calendar/rest_caller.rb', line 3

def headers
  @headers
end

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/outlook_calendar/rest_caller.rb', line 3

def method
  @method
end

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/outlook_calendar/rest_caller.rb', line 3

def params
  @params
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/outlook_calendar/rest_caller.rb', line 3

def url
  @url
end

Instance Method Details

#callObject



12
13
14
# File 'lib/outlook_calendar/rest_caller.rb', line 12

def call
  parse_response
end