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
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.94 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.93 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.91 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb