Class: Pod::Command::IPC::Podfile

Inherits:
Pod::Command::IPC show all
Defined in:
lib/cocoapods/command/inter_process_communication.rb

Overview

———————————————————————–#

Instance Method Summary collapse

Methods inherited from Pod::Command::IPC

#output_pipe

Methods inherited from Pod::Command

#ensure_master_spec_repo_exists!, options, report_error, run

Methods included from Pod::Config::Mixin

#config

Constructor Details

#initialize(argv) ⇒ Podfile

Returns a new instance of Podfile.



46
47
48
49
# File 'lib/cocoapods/command/inter_process_communication.rb', line 46

def initialize(argv)
  @path = argv.shift_argument
  super
end

Instance Method Details

#runObject



56
57
58
59
60
# File 'lib/cocoapods/command/inter_process_communication.rb', line 56

def run
  require 'yaml'
  podfile = Pod::Podfile.from_file(@path)
  output_pipe.puts podfile.to_yaml
end

#validate!Object



51
52
53
54
# File 'lib/cocoapods/command/inter_process_communication.rb', line 51

def validate!
  super
  help! 'A Podfile path is required.' unless @path
end