Module: VagrantPlugins::ProviderKvm::Util::DefinitionAttributes::InstanceMethods

Defined in:
lib/vagrant-kvm/util/definition_attributes.rb

Instance Method Summary collapse

Instance Method Details

#attributesObject



6
7
8
# File 'lib/vagrant-kvm/util/definition_attributes.rb', line 6

def attributes
  @attributes ||= {}
end

#attributes=(attrs) ⇒ Object



10
11
12
# File 'lib/vagrant-kvm/util/definition_attributes.rb', line 10

def attributes=(attrs)
  @attributes = attrs
end

#get(key) ⇒ Object



14
15
16
# File 'lib/vagrant-kvm/util/definition_attributes.rb', line 14

def get(key)
  attributes[key]
end

#set(key, val) ⇒ Object



18
19
20
# File 'lib/vagrant-kvm/util/definition_attributes.rb', line 18

def set(key, val)
  attributes[key] = val
end

#update(args = {}) ⇒ Object



22
23
24
# File 'lib/vagrant-kvm/util/definition_attributes.rb', line 22

def update(args={})
  attributes.merge!(args)
end