class Pod::Command::Spec::Cat
def self.options
def self.options [["--show-all", "Pick from all versions of the given podspec"]].concat(super) end
def initialize(argv)
def initialize(argv) @show_all = argv.flag?('show-all') @spec = argv.shift_argument @spec = @spec.gsub('.podspec', '') unless @spec.nil? super end
def run
def run filepath = if @show_all specs = get_path_of_spec(@spec, @show_all).split(/\n/) index = choose_from_array(specs, "Which spec would you like to print [1-#{ specs.count }]? ") specs[index] else get_path_of_spec(@spec) end UI.puts File.open(filepath).read end
def validate!
def validate! super help! "A podspec name is required." unless @spec end