Module: Scalingo::Endpoint::Base

Included in:
Collection, Resource
Defined in:
lib/scalingo/endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#apiObject

Returns the value of attribute api.



37
38
39
# File 'lib/scalingo/endpoint.rb', line 37

def api
  @api
end

#auth_apiObject

Returns the value of attribute auth_api.



39
40
41
# File 'lib/scalingo/endpoint.rb', line 39

def auth_api
  @auth_api
end

#prefixObject

Returns the value of attribute prefix.



38
39
40
# File 'lib/scalingo/endpoint.rb', line 38

def prefix
  @prefix
end

Instance Method Details

#initialize(api, prefix = nil, opts = {}) ⇒ Object



41
42
43
44
45
# File 'lib/scalingo/endpoint.rb', line 41

def initialize(api, prefix = nil, opts = {})
  self.api = api
  self.auth_api = opts.fetch(:auth_api, false)
  self.prefix = prefix || self.class.name.split('::').last.underscore.pluralize
end