Class: Vagrant::BoxMetadata::Provider
- Inherits:
-
Object
- Object
- Vagrant::BoxMetadata::Provider
- 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
-
#architecture ⇒ String
The architecture of the box.
-
#checksum ⇒ String
The checksum value for this box, if any.
-
#checksum_type ⇒ String
The type of checksum (if any) associated with this provider.
-
#default_architecture ⇒ Boolean, NilClass
Marked as the default architecture.
-
#name ⇒ String
The name of the provider.
-
#url ⇒ String
The URL of the box.
Instance Method Summary collapse
- #architecture_support? ⇒ Boolean
-
#initialize(raw, **_) ⇒ Provider
constructor
A new instance of Provider.
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
#architecture ⇒ String
The architecture of the box
260 261 262 |
# File 'lib/vagrant/box_metadata.rb', line 260 def architecture @architecture end |
#checksum ⇒ String
The checksum value for this box, if any.
250 251 252 |
# File 'lib/vagrant/box_metadata.rb', line 250 def checksum @checksum end |
#checksum_type ⇒ String
The type of checksum (if any) associated with this provider.
255 256 257 |
# File 'lib/vagrant/box_metadata.rb', line 255 def checksum_type @checksum_type end |
#default_architecture ⇒ Boolean, NilClass
Marked as the default architecture
265 266 267 |
# File 'lib/vagrant/box_metadata.rb', line 265 def default_architecture @default_architecture end |
#name ⇒ String
The name of the provider.
240 241 242 |
# File 'lib/vagrant/box_metadata.rb', line 240 def name @name end |
#url ⇒ String
The URL of the box.
245 246 247 |
# File 'lib/vagrant/box_metadata.rb', line 245 def url @url end |
Instance Method Details
#architecture_support? ⇒ Boolean
276 277 278 |
# File 'lib/vagrant/box_metadata.rb', line 276 def architecture_support? !@default_architecture.nil? end |