Class: Pod::Command::Spec::Doc

Inherits:
Pod::Command::Spec show all
Defined in:
lib/pod/command/spec/doc.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Doc

Returns a new instance of Doc.



13
14
15
16
# File 'lib/pod/command/spec/doc.rb', line 13

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

Instance Method Details

#runObject



23
24
25
26
27
28
# File 'lib/pod/command/spec/doc.rb', line 23

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

#validate!Object



18
19
20
21
# File 'lib/pod/command/spec/doc.rb', line 18

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