Class: Pod::Command::Spec::Doc
- Inherits:
-
Pod::Command::Spec
- Object
- Pod::Command::Spec
- Pod::Command::Spec::Doc
- Defined in:
- lib/pod/command/spec/doc.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Doc
constructor
A new instance of Doc.
- #run ⇒ Object
- #validate! ⇒ Object
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
#run ⇒ Object
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 |