Class: Pod::Command::X::Edit
- Inherits:
-
Pod::Command::X
- Object
- Pod::Command
- Pod::Command::X
- Pod::Command::X::Edit
- Extended by:
- Executable
- Defined in:
- lib/cocoapods-x/command/edit.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Edit
constructor
A new instance of Edit.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Edit
Returns a new instance of Edit.
20 21 22 23 24 25 |
# File 'lib/cocoapods-x/command/edit.rb', line 20 def initialize(argv) @wipe_pods = argv.flag?('pods') @wipe_source = argv.flag?('source') @wipe_podfile = argv.flag?('podfile') super end |
Class Method Details
.options ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/cocoapods-x/command/edit.rb', line 12 def self. [ ['--pods', 'Edit source.rb file.'], ['--source', 'Edit source.rb file.'], ['--podfile', 'Edit Podfile file.'] ].concat(super) end |
Instance Method Details
#run ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cocoapods-x/command/edit.rb', line 27 def run begin if @wipe_pods open_pods! end if @wipe_source open_source! end if @wipe_podfile open_podfile! end rescue => exception puts "[!] Pod::X #{exception}".red end end |