Method: YARD::Handlers::Ruby::Base.handles?
- Defined in:
- lib/yard/handlers/ruby/base.rb
.handles?(node) ⇒ Boolean
Returns whether or not an Parser::Ruby::AstNode object should be handled by this handler.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/yard/handlers/ruby/base.rb', line 110 def handles?(node) handlers.any? do |a_handler| case a_handler when Symbol a_handler == node.type when String node.source == a_handler when Regexp node.source =~ a_handler when Parser::Ruby::AstNode a_handler == node when HandlesExtension a_handler.matches?(node) end end end |