Class: VagrantHosts::Cap::Facts::Base
- Inherits:
-
Object
- Object
- VagrantHosts::Cap::Facts::Base
- Defined in:
- lib/vagrant-hosts/cap/facts/base.rb
Overview
Base class for retrieving network facts from guest VMs
Instance Attribute Summary collapse
- #machine ⇒ Object readonly
Class Method Summary collapse
-
.network_facts(machine) ⇒ Hash
Retrieve facts from a guest VM.
Instance Method Summary collapse
-
#initialize(machine) ⇒ Base
constructor
A new instance of Base.
- #load_facts ⇒ Object
Constructor Details
#initialize(machine) ⇒ Base
Returns a new instance of Base.
17 18 19 |
# File 'lib/vagrant-hosts/cap/facts/base.rb', line 17 def initialize(machine) @machine = machine end |
Instance Attribute Details
#machine ⇒ Object (readonly)
15 16 17 |
# File 'lib/vagrant-hosts/cap/facts/base.rb', line 15 def machine @machine end |
Class Method Details
.network_facts(machine) ⇒ Hash
Retrieve facts from a guest VM
See #load_facts for implementation details.
11 12 13 |
# File 'lib/vagrant-hosts/cap/facts/base.rb', line 11 def self.network_facts(machine) new(machine).load_facts end |
Instance Method Details
#load_facts ⇒ Object
21 22 23 |
# File 'lib/vagrant-hosts/cap/facts/base.rb', line 21 def load_facts raise NotImplementedError end |