Class: Tenderloin::Config::Top
Instance Attribute Summary collapse
-
#package ⇒ Object
readonly
Returns the value of attribute package.
-
#provisioning ⇒ Object
readonly
Returns the value of attribute provisioning.
-
#shared_folders ⇒ Object
readonly
Returns the value of attribute shared_folders.
-
#ssh ⇒ Object
readonly
Returns the value of attribute ssh.
-
#tenderloin ⇒ Object
readonly
Returns the value of attribute tenderloin.
-
#vm ⇒ Object
readonly
Returns the value of attribute vm.
Instance Method Summary collapse
-
#initialize ⇒ Top
constructor
A new instance of Top.
- #loaded! ⇒ Object
- #loaded? ⇒ Boolean
- #to_hash ⇒ Object
Methods inherited from Base
#[], #instance_variables_hash, #to_json
Constructor Details
#initialize ⇒ Top
Returns a new instance of Top.
130 131 132 133 134 135 136 137 138 139 |
# File 'lib/tenderloin/config.rb', line 130 def initialize @ssh = SSHConfig.new @vm = VMConfig.new @tenderloin = TenderloinConfig.new @package = PackageConfig.new @provisioning = ProvisioningConfig.new @shared_folders = SharedFoldersConfig.new @loaded = false end |
Instance Attribute Details
#package ⇒ Object (readonly)
Returns the value of attribute package.
123 124 125 |
# File 'lib/tenderloin/config.rb', line 123 def package @package end |
#provisioning ⇒ Object (readonly)
Returns the value of attribute provisioning.
127 128 129 |
# File 'lib/tenderloin/config.rb', line 127 def provisioning @provisioning end |
#shared_folders ⇒ Object (readonly)
Returns the value of attribute shared_folders.
128 129 130 |
# File 'lib/tenderloin/config.rb', line 128 def shared_folders @shared_folders end |
#ssh ⇒ Object (readonly)
Returns the value of attribute ssh.
124 125 126 |
# File 'lib/tenderloin/config.rb', line 124 def ssh @ssh end |
#tenderloin ⇒ Object (readonly)
Returns the value of attribute tenderloin.
126 127 128 |
# File 'lib/tenderloin/config.rb', line 126 def tenderloin @tenderloin end |
#vm ⇒ Object (readonly)
Returns the value of attribute vm.
125 126 127 |
# File 'lib/tenderloin/config.rb', line 125 def vm @vm end |
Instance Method Details
#loaded! ⇒ Object
145 146 147 |
# File 'lib/tenderloin/config.rb', line 145 def loaded! @loaded = true end |
#loaded? ⇒ Boolean
141 142 143 |
# File 'lib/tenderloin/config.rb', line 141 def loaded? @loaded end |
#to_hash ⇒ Object
149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/tenderloin/config.rb', line 149 def to_hash hsh = Tenderloin.config.instance_variables_hash hsh.delete(:tenderloin) hsh = hsh.inject({}) do |h, (k, iv)| if iv.class.to_s =~ /Tenderloin::Config/ h[k] = iv.instance_variables_hash else h[k] = iv end h end hsh end |