Class: Pod::Command::IPC::Spec
- Inherits:
-
Pod::Command::IPC
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::IPC
- Pod::Command::IPC::Spec
- Defined in:
- lib/cocoapods/command/inter_process_communication.rb
Overview
———————————————————————–#
Instance Method Summary collapse
-
#initialize(argv) ⇒ Spec
constructor
A new instance of Spec.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pod::Command::IPC
Methods inherited from Pod::Command
#ensure_master_spec_repo_exists!, options, report_error, run
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Spec
Returns a new instance of Spec.
20 21 22 23 |
# File 'lib/cocoapods/command/inter_process_communication.rb', line 20 def initialize(argv) @path = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
30 31 32 33 34 |
# File 'lib/cocoapods/command/inter_process_communication.rb', line 30 def run require 'json' spec = Specification.from_file(@path) output_pipe.puts(spec.to_pretty_json) end |
#validate! ⇒ Object
25 26 27 28 |
# File 'lib/cocoapods/command/inter_process_communication.rb', line 25 def validate! super help! 'A specification path is required.' unless @path end |