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

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

Direct Known Subclasses

Flavor, 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-openstack-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-openstack-provider/client/domain.rb', line 9

def id
  @id
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



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

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

#stateObject



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

def state
  [@id, @name]
end