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.



267
268
269
270
271
272
273
274
# File 'lib/vagrant/box_metadata.rb', line 267

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)


260
261
262
# File 'lib/vagrant/box_metadata.rb', line 260

def architecture
  @architecture
end

#checksumString

The checksum value for this box, if any.

Returns:

  • (String)


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

def checksum
  @checksum
end

#checksum_typeString

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

Returns:

  • (String)


255
256
257
# File 'lib/vagrant/box_metadata.rb', line 255

def checksum_type
  @checksum_type
end

#default_architectureBoolean, NilClass

Marked as the default architecture

Returns:

  • (Boolean, NilClass)


265
266
267
# File 'lib/vagrant/box_metadata.rb', line 265

def default_architecture
  @default_architecture
end

#nameString

The name of the provider.

Returns:

  • (String)


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

def name
  @name
end

#urlString

The URL of the box.

Returns:

  • (String)


245
246
247
# File 'lib/vagrant/box_metadata.rb', line 245

def url
  @url
end

Instance Method Details

#architecture_support?Boolean

Returns:

  • (Boolean)


276
277
278
# File 'lib/vagrant/box_metadata.rb', line 276

def architecture_support?
  !@default_architecture.nil?
end