Class: YARD::CLI::Doctest
- Inherits:
-
Command
- Object
- Command
- YARD::CLI::Doctest
- Defined in:
- lib/yard/cli/doctest.rb
Instance Method Summary collapse
- #description ⇒ Object
-
#run(*args) ⇒ Object
Runs the command line, parsing arguments and generating tests.
Instance Method Details
#description ⇒ Object
5 6 7 |
# File 'lib/yard/cli/doctest.rb', line 5 def description 'Doctests from @example tags' end |
#run(*args) ⇒ Object
Runs the command line, parsing arguments and generating tests.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/yard/cli/doctest.rb', line 16 def run(*args) files = args.select { |arg| arg !~ /^-/ } files = parse_files(files) examples = parse_examples(files) add_pwd_to_path generate_tests(examples) end |