Sha256: 7dcfc749c2ab88a808a612a6f5020c9f8ff4faeaf233d8dc393b88aebc527a59

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 Bytes

Contents

module Pod
  class Command
    class Spec
      class Doc < Spec
        self.summary = "Opens the web documentation of a Pod."

        self.description = <<-DESC
          Opens the web documentation of the Pod with the given NAME.
        DESC

        self.arguments = 'NAME'

        def initialize(argv)
          @name = argv.shift_argument
          super
        end

        def validate!
          super
          help! "A Pod name is required." unless @name
        end

        def run
          path = get_path_of_spec(@name)
          spec = Specification.from_file(path)
          UI.puts "Opening #{spec.name} documentation"
          `open "http://cocoadocs.org/docsets/#{spec.name}"`
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-docs-0.0.1 lib/pod/command/spec/doc.rb