Class: Pod::Command::IPC::Spec

Inherits:
Pod::Command::IPC show all
Defined in:
lib/cocoapods/command/inter_process_communication.rb

Overview

———————————————————————–#

Instance Method Summary collapse

Methods inherited from Pod::Command::IPC

#output_pipe

Methods inherited from Pod::Command

#ensure_master_spec_repo_exists!, options, report_error, run

Methods included from Pod::Config::Mixin

#config

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

#runObject



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