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)
-
- (String) name
readonly
protected
The extension matcher value.
Instance Method Summary (collapse)
-
- (HandlesExtension) initialize(name)
constructor
Creates a new extension with a specific matcher value name.
-
- (Boolean) matches?(node)
Tests if the node matches the handler.
Constructor Details
- (HandlesExtension) initialize(name)
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
- (String) name (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
- (Boolean) matches?(node)
Tests if the node matches the handler
26 |
# File 'lib/yard/handlers/ruby/base.rb', line 26 def matches?(node) raise NotImplementedError end |