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.
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
#architecture ⇒ String
The architecture of the box
234 235 236 |
# File 'lib/vagrant/box_metadata.rb', line 234 def architecture @architecture end |
#checksum ⇒ String
The checksum value for this box, if any.
224 225 226 |
# File 'lib/vagrant/box_metadata.rb', line 224 def checksum @checksum end |
#checksum_type ⇒ String
The type of checksum (if any) associated with this provider.
229 230 231 |
# File 'lib/vagrant/box_metadata.rb', line 229 def checksum_type @checksum_type end |
#default_architecture ⇒ Boolean, NilClass
Marked as the default architecture
239 240 241 |
# File 'lib/vagrant/box_metadata.rb', line 239 def default_architecture @default_architecture end |
#name ⇒ String
The name of the provider.
214 215 216 |
# File 'lib/vagrant/box_metadata.rb', line 214 def name @name end |
#url ⇒ String
The URL of the box.
219 220 221 |
# File 'lib/vagrant/box_metadata.rb', line 219 def url @url end |
Instance Method Details
#architecture_support? ⇒ Boolean
250 251 252 |
# File 'lib/vagrant/box_metadata.rb', line 250 def architecture_support? !@default_architecture.nil? end |