Class: Pod::Command::Reinstall
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::Reinstall
- Defined in:
- lib/pod/command/reinstall.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Reinstall
constructor
A new instance of Reinstall.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Reinstall
Returns a new instance of Reinstall.
10 11 12 |
# File 'lib/pod/command/reinstall.rb', line 10 def initialize(argv) super end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pod/command/reinstall.rb', line 18 def run # Output the results of pod install in realtime # http://stackoverflow.com/questions/10224481/running-a-command-from-ruby-displaying-and-capturing-the-output output = [] r, io = IO.pipe fork do system("pod install", out: io, err: :out) end io.close r.each_line{|l| puts l; output << l.chomp} `pod open` end |
#validate! ⇒ Object
14 15 16 |
# File 'lib/pod/command/reinstall.rb', line 14 def validate! super end |