Class: Luffa::XcodeInstall
- Inherits:
-
Object
- Object
- Luffa::XcodeInstall
- Defined in:
- lib/luffa/ios/xcode.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(path) ⇒ XcodeInstall
constructor
A new instance of XcodeInstall.
- #version_string ⇒ Object
Constructor Details
#initialize(path) ⇒ XcodeInstall
Returns a new instance of XcodeInstall.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/luffa/ios/xcode.rb', line 6 def initialize(path) Luffa::Xcode.with_developer_dir(path) do @version = lambda { xcode_build_output = `xcrun xcodebuild -version`.split(/\s/)[1] Luffa::Version.new(xcode_build_output) }.call @path = path end end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/luffa/ios/xcode.rb', line 4 def path @path end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/luffa/ios/xcode.rb', line 3 def version @version end |
Instance Method Details
#==(other) ⇒ Object
21 22 23 |
# File 'lib/luffa/ios/xcode.rb', line 21 def == (other) other.path == path && other.version == version end |
#version_string ⇒ Object
17 18 19 |
# File 'lib/luffa/ios/xcode.rb', line 17 def version_string version.to_s end |