Class: Fastlane::CreateSimulatorDevices::SimCTL::RuntimeWithState
- Inherits:
-
Object
- Object
- Fastlane::CreateSimulatorDevices::SimCTL::RuntimeWithState
- Defined in:
- lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb
Overview
Represents a runtime from ‘xcrun simctl runtime list –json` output.
Instance Attribute Summary collapse
-
#build ⇒ Object
Returns the value of attribute build.
-
#deletable ⇒ Object
Returns the value of attribute deletable.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#state ⇒ Object
Returns the value of attribute state.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
- #deletable? ⇒ Boolean
-
#initialize(identifier:, version:, build:, state:, deletable:) ⇒ RuntimeWithState
constructor
A new instance of RuntimeWithState.
- #ready? ⇒ Boolean
- #unusable? ⇒ Boolean
Constructor Details
#initialize(identifier:, version:, build:, state:, deletable:) ⇒ RuntimeWithState
Returns a new instance of RuntimeWithState.
13 14 15 16 17 18 19 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 13 def initialize(identifier:, version:, build:, state:, deletable:) self.identifier = identifier self.version = version self.build = build self.state = state self.deletable = deletable end |
Instance Attribute Details
#build ⇒ Object
Returns the value of attribute build.
11 12 13 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 11 def build @build end |
#deletable ⇒ Object
Returns the value of attribute deletable.
11 12 13 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 11 def deletable @deletable end |
#identifier ⇒ Object
Returns the value of attribute identifier.
11 12 13 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 11 def identifier @identifier end |
#state ⇒ Object
Returns the value of attribute state.
11 12 13 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 11 def state @state end |
#version ⇒ Object
Returns the value of attribute version.
11 12 13 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 11 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 33 def self.from_hash(hash) new( identifier: hash[:identifier], version: Gem::Version.new(hash[:version]), build: AppleBuildVersion.new(hash[:build]), state: hash[:state], deletable: hash[:deletable] ) end |
Instance Method Details
#deletable? ⇒ Boolean
25 26 27 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 25 def deletable? deletable end |
#ready? ⇒ Boolean
21 22 23 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 21 def ready? state == 'Ready' end |
#unusable? ⇒ Boolean
29 30 31 |
# File 'lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/runtime.rb', line 29 def unusable? state == 'Unusable' end |