Class: VagrantPlugins::Openstack::Domain::Item

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

Direct Known Subclasses

Flavor, Image, Subnet, Volume

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name) ⇒ Item

Returns a new instance of Item.



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

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

Instance Attribute Details

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/vagrant-openstack-illuin-provider/client/domain.rb', line 8

def id
  @id
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/vagrant-openstack-illuin-provider/client/domain.rb', line 8

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



14
15
16
# File 'lib/vagrant-openstack-illuin-provider/client/domain.rb', line 14

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

#stateObject



18
19
20
# File 'lib/vagrant-openstack-illuin-provider/client/domain.rb', line 18

def state
  [@id, @name]
end