Class: Pod::Command::IPC::Podfile
- Inherits:
-
Pod::Command::IPC
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::IPC
- Pod::Command::IPC::Podfile
- Includes:
- ProjectDirectory
- Defined in:
- lib/cocoapods/command/ipc/podfile.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Podfile
constructor
A new instance of Podfile.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pod::Command::IPC
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
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
#run ⇒ Object
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 |