Sha256: 685aa7d9568118fe49d035b3ded991a1f220d1fe5c2a67b4e6c2dbc34357d893

Contents?: true

Size: 573 Bytes

Versions: 1

Compression:

Stored size: 573 Bytes

Contents

require 'vagrant'
require 'uri'
require 'pe_build'

class PEBuild::Config < Vagrant::Config::Base
  attr_writer :download_root
  attr_writer :version
  attr_writer :filename
  attr_writer :suffix

  def download_root
    @download_root
  end

  def version
    @version
  end

  def filename
    @filename
  end

  def suffix
    @suffix || :all
  end

  def validate(env, errors)
    URI.parse(download_root)
  rescue
    # TODO I18n
    errors.add("Invalid download root '#{download_root.inspect}'")
  end
end

Vagrant.config_keys.register(:pe_build) { PEBuild::Config }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-pe_build-0.0.3 lib/pe_build/config.rb