Class: Pod::Command::IPC::PodfileJSON
- Inherits:
-
Pod::Command::IPC
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::IPC
- Pod::Command::IPC::PodfileJSON
- Includes:
- ProjectDirectory
- Defined in:
- lib/cocoapods/command/ipc/podfile_json.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ PodfileJSON
constructor
A new instance of PodfileJSON.
- #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) ⇒ PodfileJSON
Returns a new instance of PodfileJSON.
13 14 15 16 |
# File 'lib/cocoapods/command/ipc/podfile_json.rb', line 13 def initialize(argv) @path = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
23 24 25 26 |
# File 'lib/cocoapods/command/ipc/podfile_json.rb', line 23 def run podfile = Pod::Podfile.from_file(@path) output_pipe.puts podfile.to_hash.to_json end |
#validate! ⇒ Object
18 19 20 21 |
# File 'lib/cocoapods/command/ipc/podfile_json.rb', line 18 def validate! super help! 'A Podfile path is required.' unless @path end |