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-0.1.90 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.89 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.88 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.87 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.86 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.85 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.84 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.83 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.82 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.81 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.80 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.79 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.78 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.77 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.76 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.75 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.74 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.73 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.72 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb
harbr-0.1.71 vendor/bundle/ruby/3.2.0/gems/regexp_parser-2.8.2/lib/regexp_parser/expression/classes/character_set.rb