Class: VagrantPlugins::Invade::InvadeModule::Nfs
- Inherits:
-
InvadeModule
- Object
- InvadeModule
- VagrantPlugins::Invade::InvadeModule::Nfs
- Defined in:
- lib/vagrant-invade/module/nfs/nfs.rb
Instance Attribute Summary collapse
-
#nfs_data ⇒ Object
Returns the value of attribute nfs_data.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(nfs_data, result: nil) ⇒ Nfs
constructor
A new instance of Nfs.
Methods inherited from InvadeModule
Constructor Details
#initialize(nfs_data, result: nil) ⇒ Nfs
Returns a new instance of Nfs.
10 11 12 13 |
# File 'lib/vagrant-invade/module/nfs/nfs.rb', line 10 def initialize(nfs_data, result: nil) @nfs_data = nfs_data @result = result end |
Instance Attribute Details
#nfs_data ⇒ Object
Returns the value of attribute nfs_data.
8 9 10 |
# File 'lib/vagrant-invade/module/nfs/nfs.rb', line 8 def nfs_data @nfs_data end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
7 8 9 |
# File 'lib/vagrant-invade/module/nfs/nfs.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 |
# File 'lib/vagrant-invade/module/nfs/nfs.rb', line 15 def build b = binding begin # Values for nfs part functional = @nfs_data['functional'] @nfs_data['map_uid'] ? map_uid = @nfs_data['map_uid'] : map_uid = Process.uid @nfs_data['map_gid'] ? map_gid = @nfs_data['map_gid'] : map_gid = Process.gid verify_installed = @nfs_data['verify_installed'] eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__))) @result = eruby.result b rescue TypeError, SyntaxError, SystemCallError => e raise(e) end end |