Class: Bixby::Provision::Variable

Inherits:
Base
  • Object
show all
Defined in:
lib/bixby/provision/dsl/variable.rb

Constant Summary collapse

EXPORTS =
[:set, :get]

Constants inherited from Base

Base::PATH

Instance Attribute Summary

Attributes inherited from Base

#manifest, #proxy

Instance Method Summary collapse

Methods inherited from Base

#get_gid, #get_group, #get_uid, #get_user, #tap

Methods included from Util::File

#chmod, #chown, #sha256sum, #which

Constructor Details

#initialize(*args) ⇒ Variable

Returns a new instance of Variable.



9
10
11
12
# File 'lib/bixby/provision/dsl/variable.rb', line 9

def initialize(*args)
  super
  @variables = {}
end

Instance Method Details

#get(name) ⇒ Object



18
19
20
# File 'lib/bixby/provision/dsl/variable.rb', line 18

def get(name)
  @variables[name]
end

#set(name, value) ⇒ Object



14
15
16
# File 'lib/bixby/provision/dsl/variable.rb', line 14

def set(name, value)
  @variables[name] = value
end