Sha256: c7c801be31767a7a700e651f8b31686f5e3d270a991b1bee2619e53ec64d52c3

Contents?: true

Size: 980 Bytes

Versions: 7

Compression:

Stored size: 980 Bytes

Contents

module VagrantPlugins
  module Invade
    module InvadeModule

      class Hostmanager < InvadeModule

        attr_reader :result
        attr_accessor :hostmanager_data

        def initialize(hostmanager_data, result: nil)
          @hostmanager_data = hostmanager_data
          @result = result
        end

        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
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vagrant-invade-0.8.0 lib/vagrant-invade/module/hostmanager/hostmanager.rb
vagrant-invade-0.7.0 lib/vagrant-invade/module/hostmanager/hostmanager.rb
vagrant-invade-0.6.4 lib/vagrant-invade/module/hostmanager/hostmanager.rb
vagrant-invade-0.6.3 lib/vagrant-invade/module/hostmanager/hostmanager.rb
vagrant-invade-0.6.2 lib/vagrant-invade/module/hostmanager/hostmanager.rb
vagrant-invade-0.6.1 lib/vagrant-invade/module/hostmanager/hostmanager.rb
vagrant-invade-0.6.0 lib/vagrant-invade/module/hostmanager/hostmanager.rb