Class: YARD::Server::Adapter
- Inherits:
-
Object
- Object
- YARD::Server::Adapter
- Defined in:
- lib/yard/server/adapter.rb
Class Method Summary collapse
-
.setup ⇒ Object
To provide the templates necessary for ‘yard-cucumber` to integrate with YARD the adapter has to around-alias the setup method to place the `yard-cucumber` server templates as the last template in the list.
-
.shutdown ⇒ Object
Similar to the addition, it is good business to tear down the templates that were added by again around-aliasing the shutdown method.
- .yard_setup ⇒ Object
- .yard_shutdown ⇒ Object
Class Method Details
.setup ⇒ Object
To provide the templates necessary for ‘yard-cucumber` to integrate with YARD the adapter has to around-alias the setup method to place the `yard-cucumber` server templates as the last template in the list.
When they are normally loaded with the plugin they cause an error with the ‘yardoc` command. They are also not used because the YARD server templates are placed after all plugin templates.
19 20 21 22 23 |
# File 'lib/yard/server/adapter.rb', line 19 def setup yard_setup YARD::Templates::Engine.template_paths += [File.dirname(__FILE__) + '/../../templates',File.dirname(__FILE__) + '/../../docserver'] end |
.shutdown ⇒ Object
Similar to the addition, it is good business to tear down the templates that were added by again around-aliasing the shutdown method.
31 32 33 34 35 |
# File 'lib/yard/server/adapter.rb', line 31 def shutdown yard_shutdown YARD::Templates::Engine.template_paths -= [File.dirname(__FILE__) + '/../../templates',File.dirname(__FILE__) + '/../../docserver'] end |
.yard_setup ⇒ Object
8 |
# File 'lib/yard/server/adapter.rb', line 8 alias_method :yard_setup, :setup |
.yard_shutdown ⇒ Object
25 |
# File 'lib/yard/server/adapter.rb', line 25 alias_method :yard_shutdown, :shutdown |