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/ipc/spec.rb
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!, ensure_not_root_or_allowed!, options, report_error, run
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Spec
Returns a new instance of Spec.
11 12 13 14 |
# File 'lib/cocoapods/command/ipc/spec.rb', line 11 def initialize(argv) @path = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 |
# File 'lib/cocoapods/command/ipc/spec.rb', line 21 def run require 'json' spec = Specification.from_file(@path) output_pipe.puts(spec.to_pretty_json) end |
#validate! ⇒ Object
16 17 18 19 |
# File 'lib/cocoapods/command/ipc/spec.rb', line 16 def validate! super help! 'A specification path is required.' unless @path end |