Class: Scalingo::Endpoint::Resource

Inherits:
OpenStruct
  • Object
show all
Includes:
Scalingo::Endpoint, Base
Defined in:
lib/scalingo/endpoint.rb

Instance Attribute Summary

Attributes included from Base

#api, #auth_api, #prefix

Instance Method Summary collapse

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Constructor Details

#initialize(api, prefix, opts = {}, data = {}) ⇒ Resource

Returns a new instance of Resource.



61
62
63
64
# File 'lib/scalingo/endpoint.rb', line 61

def initialize(api, prefix, opts = {}, data = {})
  Base.instance_method(:initialize).bind(self).call(api, prefix, opts)
  OpenStruct.instance_method(:initialize).bind(self).call(data)
end