Class: SimCtl::Runtime
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/simctl/runtime.rb
Instance Attribute Summary collapse
-
#buildversion ⇒ Object
readonly
Returns the value of attribute buildversion.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#is_available ⇒ Object
readonly
Returns the value of attribute is_available.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
-
.latest(type) ⇒ SimCtl::Runtime
Returns the latest available runtime.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #availability ⇒ Object
-
#initialize(args) ⇒ Runtime
constructor
A new instance of Runtime.
Constructor Details
#initialize(args) ⇒ Runtime
Returns a new instance of Runtime.
10 11 12 13 |
# File 'lib/simctl/runtime.rb', line 10 def initialize(args) args['is_available'] = args.delete('isAvailable') super end |
Instance Attribute Details
#buildversion ⇒ Object (readonly)
Returns the value of attribute buildversion.
8 9 10 |
# File 'lib/simctl/runtime.rb', line 8 def buildversion @buildversion end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
8 9 10 |
# File 'lib/simctl/runtime.rb', line 8 def identifier @identifier end |
#is_available ⇒ Object (readonly)
Returns the value of attribute is_available.
8 9 10 |
# File 'lib/simctl/runtime.rb', line 8 def is_available @is_available end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/simctl/runtime.rb', line 8 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/simctl/runtime.rb', line 8 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/simctl/runtime.rb', line 8 def version @version end |
Class Method Details
.latest(type) ⇒ SimCtl::Runtime
Returns the latest available runtime
34 35 36 |
# File 'lib/simctl/runtime.rb', line 34 def self.latest(type) Naturally.sort_by(SimCtl.list_runtimes.where(identifier: /#{type}/i), :version).last end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 27 28 |
# File 'lib/simctl/runtime.rb', line 24 def ==(other) return false if other.nil? return false unless other.is_a? Runtime other.identifier == identifier end |
#availability ⇒ Object
15 16 17 |
# File 'lib/simctl/runtime.rb', line 15 def availability is_available end |