Class: YARD::Handlers::Ruby::HandlesExtension
- Inherits:
-
Object
- Object
- YARD::Handlers::Ruby::HandlesExtension
- Defined in:
- lib/yard/handlers/ruby/base.rb
Overview
To implement a custom handler matcher, subclass this class and implement #matches? to return whether a node matches the handler.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
protected
The extension matcher value.
Instance Method Summary collapse
-
#initialize(name) ⇒ HandlesExtension
constructor
Creates a new extension with a specific matcher value
name
. -
#matches?(node) ⇒ Boolean
Tests if the node matches the handler.
Constructor Details
#initialize(name) ⇒ HandlesExtension
Creates a new extension with a specific matcher value name
22 |
# File 'lib/yard/handlers/ruby/base.rb', line 22 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ String (readonly, protected)
Returns the extension matcher value.
34 35 36 |
# File 'lib/yard/handlers/ruby/base.rb', line 34 def name @name end |
Instance Method Details
#matches?(node) ⇒ Boolean
Tests if the node matches the handler
27 28 29 |
# File 'lib/yard/handlers/ruby/base.rb', line 27 def matches?(node) # rubocop:disable Lint/UnusedMethodArgument raise NotImplementedError end |