Class: Colombo::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/colombo/resource.rb

Direct Known Subclasses

Droplet, Image, Region, Size, SshKey

Instance Method Summary collapse

Constructor Details

#initialize(client, attr_hash) ⇒ Resource

Returns a new instance of Resource.



6
7
8
9
10
11
12
13
# File 'lib/colombo/resource.rb', line 6

def initialize(client, attr_hash)
  @client   = client
  if attr_hash
    attr_hash.each do |key, value|
      __send__("#{key}=", value) if self.respond_to?( key.to_sym )
    end
  end
end