Class: VagrantPlugins::AVF::HostPlatform
- Inherits:
-
Object
- Object
- VagrantPlugins::AVF::HostPlatform
- Defined in:
- lib/vagrant_provider_avf/host_platform.rb
Instance Attribute Summary collapse
-
#cpu ⇒ Object
readonly
Returns the value of attribute cpu.
-
#os ⇒ Object
readonly
Returns the value of attribute os.
Class Method Summary collapse
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(os:, cpu:) ⇒ HostPlatform
constructor
A new instance of HostPlatform.
- #supported? ⇒ Boolean
Constructor Details
#initialize(os:, cpu:) ⇒ HostPlatform
Returns a new instance of HostPlatform.
15 16 17 18 |
# File 'lib/vagrant_provider_avf/host_platform.rb', line 15 def initialize(os:, cpu:) @os = os @cpu = cpu end |
Instance Attribute Details
#cpu ⇒ Object (readonly)
Returns the value of attribute cpu.
6 7 8 |
# File 'lib/vagrant_provider_avf/host_platform.rb', line 6 def cpu @cpu end |
#os ⇒ Object (readonly)
Returns the value of attribute os.
6 7 8 |
# File 'lib/vagrant_provider_avf/host_platform.rb', line 6 def os @os end |
Class Method Details
.current ⇒ Object
8 9 10 11 12 13 |
# File 'lib/vagrant_provider_avf/host_platform.rb', line 8 def self.current new( os: RbConfig::CONFIG.fetch("host_os"), cpu: RbConfig::CONFIG.fetch("host_cpu") ) end |
Instance Method Details
#description ⇒ Object
24 25 26 |
# File 'lib/vagrant_provider_avf/host_platform.rb', line 24 def description "#{@os}/#{@cpu}" end |
#supported? ⇒ Boolean
20 21 22 |
# File 'lib/vagrant_provider_avf/host_platform.rb', line 20 def supported? macos? && apple_silicon? end |