Class: Cloudpassage::Single

Inherits:
Base
  • Object
show all
Defined in:
lib/cloudpassage/single.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #data, #headers, #method_missing, #object_symbol, #post, #reload, #wait_for

Constructor Details

#initialize(token, base_resource, id, data = nil) ⇒ Single

Returns a new instance of Single.



8
9
10
11
# File 'lib/cloudpassage/single.rb', line 8

def initialize(token, base_resource, id, data=nil)
  @id = id
  super(token, base_resource[@id], data)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Cloudpassage::Base

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/cloudpassage/single.rb', line 6

def id
  @id
end

Instance Method Details

#getObject



13
14
15
# File 'lib/cloudpassage/single.rb', line 13

def get
  @base_resource.get(headers)
end