Sha256: 6998ab98595ebf2e3348ad8199c795359ae33d66c23088946ef44429f5f1d8db

Contents?: true

Size: 558 Bytes

Versions: 95

Compression:

Stored size: 558 Bytes

Contents

module Regexp::Expression
  class CharacterSet < Regexp::Expression::Subexpression
    attr_accessor :closed, :negative

    alias :negative? :negative
    alias :negated?  :negative
    alias :closed?   :closed

    def initialize(token, options = {})
      self.negative = false
      self.closed   = false
      super
    end

    def negate
      self.negative = true
    end

    def close
      self.closed = true
    end
  end

  # alias for symmetry between token symbol and Expression class name
  Set = CharacterSet
end # module Regexp::Expression

Version data entries

95 entries across 95 versions & 11 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
regexp_parser-2.8.2 lib/regexp_parser/expression/classes/character_set.rb
synctera_ruby_sdk-1.1.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
synctera_ruby_sdk-1.1.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
synctera_ruby_sdk-1.1.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
sampero-0.1.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
tursodb-0.1.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
synctera_ruby_sdk-1.0.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.1/lib/regexp_parser/expression/classes/character_set.rb
regexp_parser-2.8.1 lib/regexp_parser/expression/classes/character_set.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/regexp_parser-2.8.0/lib/regexp_parser/expression/classes/character_set.rb
regexp_parser-2.8.0 lib/regexp_parser/expression/classes/character_set.rb