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, #prefix

Instance Method Summary collapse

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Constructor Details

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

Returns a new instance of Resource.



50
51
52
53
# File 'lib/scalingo/endpoint.rb', line 50

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