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.



15
16
17
18
# File 'lib/pod/command/spec/doc.rb', line 15

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

Instance Method Details

#runObject



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

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



20
21
22
23
# File 'lib/pod/command/spec/doc.rb', line 20

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