Method: YARD::Handlers::Ruby::Legacy::Base.handles?
- Defined in:
- lib/yard/handlers/ruby/legacy/base.rb
.handles?(stmt) ⇒ Boolean
Returns whether or not a Parser::Ruby::Legacy::Statement object should be handled by this handler.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/yard/handlers/ruby/legacy/base.rb', line 15 def self.handles?(stmt) handlers.any? do |a_handler| case a_handler when String stmt.tokens.first.text == a_handler when Regexp stmt.tokens.to_s =~ a_handler else a_handler == stmt.tokens.first.class end end end |