Class: YardExampleTest::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- YardExampleTest::RakeTask
- Defined in:
- lib/yard_example_test/rake.rb
Overview
Rake task for running YARD @example tags as tests.
Instance Attribute Summary collapse
-
#name ⇒ String
The name of the Rake task.
-
#pattern ⇒ String
Glob pattern for files to pass to +yard test-examples+.
-
#test_examples_opts ⇒ Array<String>
Options passed to the +yard test-examples+ command.
Instance Method Summary collapse
-
#initialize(name = 'yard:test-examples') {|self| ... }
constructor
Creates and registers the Rake task.
Constructor Details
#initialize(name = 'yard:test-examples') {|self| ... }
Creates and registers the Rake task
67 68 69 70 71 72 73 74 |
# File 'lib/yard_example_test/rake.rb', line 67 def initialize(name = 'yard:test-examples') super() @name = name @test_examples_opts = [] @pattern = '' yield self if block_given? define end |
Instance Attribute Details
#name ⇒ String
The name of the Rake task
29 30 31 |
# File 'lib/yard_example_test/rake.rb', line 29 def name @name end |
#pattern ⇒ String
Glob pattern for files to pass to +yard test-examples+
51 52 53 |
# File 'lib/yard_example_test/rake.rb', line 51 def pattern @pattern end |
#test_examples_opts ⇒ Array<String>
Options passed to the +yard test-examples+ command
40 41 42 |
# File 'lib/yard_example_test/rake.rb', line 40 def test_examples_opts @test_examples_opts end |