Class: Fourflusher::Simulator
- Inherits:
-
Object
- Object
- Fourflusher::Simulator
- Defined in:
- lib/fourflusher/find.rb
Overview
Metadata about an installed Xcode simulator
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#os_name ⇒ Object
readonly
Returns the value of attribute os_name.
-
#os_version ⇒ Object
readonly
Returns the value of attribute os_version.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/fourflusher/find.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/fourflusher/find.rb', line 8 def name @name end |
#os_name ⇒ Object (readonly)
Returns the value of attribute os_name.
9 10 11 |
# File 'lib/fourflusher/find.rb', line 9 def os_name @os_name end |
#os_version ⇒ Object (readonly)
Returns the value of attribute os_version.
10 11 12 |
# File 'lib/fourflusher/find.rb', line 10 def os_version @os_version end |
Class Method Details
.match(line, os_name, os_version) ⇒ Object
12 13 14 15 16 |
# File 'lib/fourflusher/find.rb', line 12 def self.match(line, os_name, os_version) sims = [] @@sim_regex.match(line) { |m| sims << Simulator.new(m, os_name, Gem::Version.new(os_version)) } sims end |
Instance Method Details
#compatible?(other_version) ⇒ Boolean
18 19 20 |
# File 'lib/fourflusher/find.rb', line 18 def compatible?(other_version) other_version <= os_version end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/fourflusher/find.rb', line 22 def to_s "#{@name} (#{@id}) - #{@os_name} #{@os_version}" end |