Class: Regexp::Syntax::Any

Inherits:
Base
  • Object
show all
Defined in:
lib/regexp_parser/syntax.rb

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

Methods inherited from Base

#excludes, #implementation, #implements, #normalize, #normalize_backref, #normalize_group

Constructor Details

#initializeAny

Returns a new instance of Any.



210
211
212
# File 'lib/regexp_parser/syntax.rb', line 210

def initialize
  @implements = { :* => [:*] }
end

Instance Method Details

#implements!(type, token) ⇒ Object



215
# File 'lib/regexp_parser/syntax.rb', line 215

def implements!(type, token) true end

#implements?(type, token) ⇒ Boolean

Returns:

  • (Boolean)


214
# File 'lib/regexp_parser/syntax.rb', line 214

def implements?(type, token) true end