Class: Xcodeproj::Command::Sort
- Inherits:
-
Xcodeproj::Command
- Object
- CLAide::Command
- Xcodeproj::Command
- Xcodeproj::Command::Sort
- Defined in:
- lib/xcodeproj/command/sort.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Sort
constructor
A new instance of Sort.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Sort
Returns a new instance of Sort.
16 17 18 19 |
# File 'lib/xcodeproj/command/sort.rb', line 16 def initialize(argv) self.xcodeproj_path = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
26 27 28 29 30 |
# File 'lib/xcodeproj/command/sort.rb', line 26 def run xcodeproj.sort xcodeproj.save puts "The `#{File.basename(xcodeproj_path)}` project was sorted" end |
#validate! ⇒ Object
21 22 23 24 |
# File 'lib/xcodeproj/command/sort.rb', line 21 def validate! super open_project! end |