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

Inherits:
Pod::Command::IPC show all
Includes:
ProjectDirectory
Defined in:
lib/cocoapods/command/ipc/podfile.rb

Instance Method Summary collapse

Methods inherited from Pod::Command::IPC

#output_pipe

Methods inherited from Pod::Command

#ensure_master_spec_repo_exists!, ensure_not_root_or_allowed!, options, report_error, run

Methods included from Pod::Config::Mixin

#config

Constructor Details

#initialize(argv) ⇒ Podfile

Returns a new instance of Podfile.



13
14
15
16
# File 'lib/cocoapods/command/ipc/podfile.rb', line 13

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

Instance Method Details

#runObject



23
24
25
26
27
# File 'lib/cocoapods/command/ipc/podfile.rb', line 23

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

#validate!Object



18
19
20
21
# File 'lib/cocoapods/command/ipc/podfile.rb', line 18

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