Class: Xcodeproj::Command::TargetDiff
- Inherits:
-
Xcodeproj::Command
- Object
- CLAide::Command
- Xcodeproj::Command
- Xcodeproj::Command::TargetDiff
- Defined in:
- lib/xcodeproj/command/target_diff.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ TargetDiff
constructor
A new instance of TargetDiff.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ TargetDiff
Returns a new instance of TargetDiff.
17 18 19 20 21 22 |
# File 'lib/xcodeproj/command/target_diff.rb', line 17 def initialize(argv) @target1 = argv.shift_argument @target2 = argv.shift_argument self.xcodeproj_path = argv.option('--project') super end |
Class Method Details
.options ⇒ Object
6 7 8 9 10 |
# File 'lib/xcodeproj/command/target_diff.rb', line 6 def self. [ ['--project PATH', 'The Xcode project document to use.'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/xcodeproj/command/target_diff.rb', line 29 def run require 'yaml' differ = Helper::TargetDiff.new(xcodeproj, @target1, @target2) files = differ.new_source_build_files.map do |build_file| { 'Name' => build_file.file_ref.name, 'Path' => build_file.file_ref.path, 'Build settings' => build_file.settings, } end puts files.to_yaml end |
#validate! ⇒ Object
24 25 26 27 |
# File 'lib/xcodeproj/command/target_diff.rb', line 24 def validate! super open_project! end |