Sha256: ccc245757c4b54bf67906ddbb9011345c79f18dd7af1ce37b99e9d3a02573b5b

Contents?: true

Size: 741 Bytes

Versions: 15

Compression:

Stored size: 741 Bytes

Contents

module VagrantPlugins
  module Invade
    module Validator

      class Invade

        attr_accessor :env
        attr_accessor :invade

        DEFAULT = {
          'auto' => false,
          'debug' => false
        }

        def initialize(env, invade)
          @env = env
          @invade = invade
        end

        def validate
          return nil unless @invade

          # INVADE ON/OFF
          @invade['auto'] = Validator.validate_boolean(
            @invade['auto'], 'auto', DEFAULT['auto']
          )

          # DEBUG MODE ON/OFF
          @invade['debug'] = Validator.validate_boolean(
            @invade['debug'], 'debug', DEFAULT['debug']
          )

          @invade
        end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vagrant-invade-0.4.8 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.7 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.6 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.5 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.4 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.3 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.2 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.1 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.0 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.4.0.pre.alpha lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.3.4 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.3.3 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.3.2 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.3.0 lib/vagrant-invade/validator/invade.rb
vagrant-invade-0.2.0 lib/vagrant-invade/validator/invade.rb