Sha256: 1a988f617df44977f1c493080ccb1eb1a5ddf575b7f516bd225ca6d81be168e2

Contents?: true

Size: 429 Bytes

Versions: 7

Compression:

Stored size: 429 Bytes

Contents

module Regexp::Syntax
  # 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.
  class Any < Base
    def initialize # rubocop:disable Lint/MissingSuper
      @implements = { :* => %i[*] }
    end

    def implements?(_type, _token) true end
    def implements!(_type, _token) true end
  end
end

Version data entries

7 entries across 7 versions & 5 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/regexp_parser-2.2.1/lib/regexp_parser/syntax/any.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/regexp_parser-2.2.1/lib/regexp_parser/syntax/any.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/regexp_parser-2.2.1/lib/regexp_parser/syntax/any.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/regexp_parser-2.2.1/lib/regexp_parser/syntax/any.rb
regexp_parser-2.2.1 lib/regexp_parser/syntax/any.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/regexp_parser-2.2.0/lib/regexp_parser/syntax/any.rb
regexp_parser-2.2.0 lib/regexp_parser/syntax/any.rb