Class: Gerencianet::Endpoints

Inherits:
Object
  • Object
show all
Defined in:
lib/gerencianet/endpoints.rb

Overview

Given the constants file, with the endpoints signatures, this class maps each one of them to a concerning function

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Endpoints

Returns a new instance of Endpoints.



17
18
19
20
21
22
23
24
25
26
# File 'lib/gerencianet/endpoints.rb', line 17

def initialize(options)
  @token = nil
  @options = options
  @endpoints = Constants::ENDPOINTS
  @urls = Constants::URL
  @base_url = current_base_url

  create_methods
  
end

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url.



14
15
16
# File 'lib/gerencianet/endpoints.rb', line 14

def base_url
  @base_url
end

#endpointsObject (readonly)

Returns the value of attribute endpoints.



12
13
14
# File 'lib/gerencianet/endpoints.rb', line 12

def endpoints
  @endpoints
end

#optionsObject (readonly)

Returns the value of attribute options.



15
16
17
# File 'lib/gerencianet/endpoints.rb', line 15

def options
  @options
end

#tokenObject

Returns the value of attribute token.



11
12
13
# File 'lib/gerencianet/endpoints.rb', line 11

def token
  @token
end

#urlsObject (readonly)

Returns the value of attribute urls.



13
14
15
# File 'lib/gerencianet/endpoints.rb', line 13

def urls
  @urls
end