Class: VagrantBoxVersion::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_box_version/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
# File 'lib/vagrant_box_version/config.rb', line 6

def initialize()
  @url = UNSET_VALUE
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/vagrant_box_version/config.rb', line 4

def url
  @url
end

Instance Method Details

#finalize!Object



10
11
12
# File 'lib/vagrant_box_version/config.rb', line 10

def finalize!
  @url = "" if @url == UNSET_VALUE
end

#validate(machine) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/vagrant_box_version/config.rb', line 14

def validate(machine)
  if @url.empty?
    { "version" => ["config.version.url must be set"] }
  else
    {}
  end
end