Class: Vagrant::BoxMetadata::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/box_metadata.rb

Overview

Provider represents a single provider-specific box available for a version for a box.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw, **_) ⇒ Provider

Returns a new instance of Provider.



241
242
243
244
245
246
247
248
# File 'lib/vagrant/box_metadata.rb', line 241

def initialize(raw, **_)
  @name = raw["name"]
  @url  = raw["url"]
  @checksum = raw["checksum"]
  @checksum_type = raw["checksum_type"]
  @architecture = raw["architecture"]
  @default_architecture = raw["default_architecture"]
end

Instance Attribute Details

#architectureString

The architecture of the box

Returns:

  • (String)


234
235
236
# File 'lib/vagrant/box_metadata.rb', line 234

def architecture
  @architecture
end

#checksumString

The checksum value for this box, if any.

Returns:

  • (String)


224
225
226
# File 'lib/vagrant/box_metadata.rb', line 224

def checksum
  @checksum
end

#checksum_typeString

The type of checksum (if any) associated with this provider.

Returns:

  • (String)


229
230
231
# File 'lib/vagrant/box_metadata.rb', line 229

def checksum_type
  @checksum_type
end

#default_architectureBoolean, NilClass

Marked as the default architecture

Returns:

  • (Boolean, NilClass)


239
240
241
# File 'lib/vagrant/box_metadata.rb', line 239

def default_architecture
  @default_architecture
end

#nameString

The name of the provider.

Returns:

  • (String)


214
215
216
# File 'lib/vagrant/box_metadata.rb', line 214

def name
  @name
end

#urlString

The URL of the box.

Returns:

  • (String)


219
220
221
# File 'lib/vagrant/box_metadata.rb', line 219

def url
  @url
end

Instance Method Details

#architecture_support?Boolean

Returns:

  • (Boolean)


250
251
252
# File 'lib/vagrant/box_metadata.rb', line 250

def architecture_support?
  !@default_architecture.nil?
end