Class: VagrantPlugins::Deltacloud::Domain::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-deltacloud-provider/client/domain.rb

Direct Known Subclasses

HardwareProfile, Image, Instance, Network, Subnet, Volume

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name) ⇒ Item

Returns a new instance of Item.



10
11
12
13
# File 'lib/vagrant-deltacloud-provider/client/domain.rb', line 10

def initialize(id, name)
  @id = id
  @name = name
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/vagrant-deltacloud-provider/client/domain.rb', line 9

def id
  @id
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/vagrant-deltacloud-provider/client/domain.rb', line 9

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/vagrant-deltacloud-provider/client/domain.rb', line 15

def ==(other)
  other.class == self.class && other.state == state
end

#stateObject



19
20
21
# File 'lib/vagrant-deltacloud-provider/client/domain.rb', line 19

def state
  [@id, @name]
end