Class: Regexp::Syntax::Any
Overview
A syntax that always returns true, passing all tokens as implemented. This is useful during development, testing, and should be useful for some types of transformations as well.
Instance Method Summary collapse
- #implements!(type, token) ⇒ Object
- #implements?(type, token) ⇒ Boolean
-
#initialize ⇒ Any
constructor
A new instance of Any.
Methods inherited from Base
#excludes, #implementation, #implements, #normalize, #normalize_backref, #normalize_group
Constructor Details
#initialize ⇒ Any
Returns a new instance of Any.
207 208 209 |
# File 'lib/regexp_parser/syntax.rb', line 207 def initialize @implements = { :* => [:*] } end |
Instance Method Details
#implements!(type, token) ⇒ Object
212 |
# File 'lib/regexp_parser/syntax.rb', line 212 def implements!(type, token) true end |
#implements?(type, token) ⇒ Boolean
211 |
# File 'lib/regexp_parser/syntax.rb', line 211 def implements?(type, token) true end |