Class: Fission::Config
Constant Summary collapse
- CONF_FILE =
Public: Path to the Fission conf file (default: ~/.fissionrc).
File. '~/.fissionrc'
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Public: Gets/Sets the Hash of attributes.
Instance Method Summary collapse
-
#[](item) ⇒ Object
Public: Helper method to access config atributes.
-
#initialize ⇒ Config
constructor
Public: Initializes a Config object.
Constructor Details
#initialize ⇒ Config
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/fission/config.rb', line 19 def initialize @attributes = {} @attributes['vm_dir'] = File.('~/Documents/Virtual Machines.localized/') @attributes['lease_file'] = '/var/db/vmware/vmnet-dhcpd-vmnet8.leases' @attributes['vmrun_bin'] = '/Library/Application Support/VMware Fusion/vmrun' @attributes['plist_file'] = File.('~/Library/Preferences/com.vmware.fusion.plist') @attributes['gui_bin'] = File.('/Applications/VMware Fusion.app/Contents/MacOS/vmware') load_from_file @attributes['vmrun_cmd'] = "'#{@attributes['vmrun_bin']}' -T fusion" end |
Instance Attribute Details
#attributes ⇒ Object
Public: Gets/Sets the Hash of attributes.
5 6 7 |
# File 'lib/fission/config.rb', line 5 def attributes @attributes end |
Instance Method Details
#[](item) ⇒ Object
44 45 46 |
# File 'lib/fission/config.rb', line 44 def [](item) @attributes[item] end |