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
21 |
# File 'lib/yard/handlers/ruby/base.rb', line 21 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ String (readonly, protected)
Returns the extension matcher value.
31 32 33 |
# File 'lib/yard/handlers/ruby/base.rb', line 31 def name @name end |
Instance Method Details
#matches?(node) ⇒ Boolean
Tests if the node matches the handler
26 |
# File 'lib/yard/handlers/ruby/base.rb', line 26 def matches?(node) raise NotImplementedError end |