Class: VagrantPlugins::Invade::InvadeModule::Hostmanager
- Inherits:
-
InvadeModule
- Object
- InvadeModule
- VagrantPlugins::Invade::InvadeModule::Hostmanager
- Defined in:
- lib/vagrant-invade/module/hostmanager/hostmanager.rb
Instance Attribute Summary collapse
-
#hostmanager_data ⇒ Object
Returns the value of attribute hostmanager_data.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(hostmanager_data, result: nil) ⇒ Hostmanager
constructor
A new instance of Hostmanager.
Methods inherited from InvadeModule
Constructor Details
#initialize(hostmanager_data, result: nil) ⇒ Hostmanager
Returns a new instance of Hostmanager.
10 11 12 13 |
# File 'lib/vagrant-invade/module/hostmanager/hostmanager.rb', line 10 def initialize(hostmanager_data, result: nil) @hostmanager_data = hostmanager_data @result = result end |
Instance Attribute Details
#hostmanager_data ⇒ Object
Returns the value of attribute hostmanager_data.
8 9 10 |
# File 'lib/vagrant-invade/module/hostmanager/hostmanager.rb', line 8 def hostmanager_data @hostmanager_data end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
7 8 9 |
# File 'lib/vagrant-invade/module/hostmanager/hostmanager.rb', line 7 def result @result end |
Instance Method Details
#build ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/vagrant-invade/module/hostmanager/hostmanager.rb', line 15 def build b = binding begin # Values for hostmanager part enabled = @hostmanager_data['enabled'] manage_host = @hostmanager_data['manage_host'] manage_guest = @hostmanager_data['manage_guest'] ignore_private_ip = @hostmanager_data['ignore_private_ip'] include_offline = @hostmanager_data['include_offline'] eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__))) @result = eruby.result b rescue TypeError, SyntaxError, SystemCallError => e raise(e) end end |