Sha256: 3b46d8893935a3dee34282cc116dba6a93d571852a82dfe7d68f352238c77805
Contents?: true
Size: 585 Bytes
Versions: 67
Compression:
Stored size: 585 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 def to_s(format = :full) "#{text}#{'^' if negated?}#{expressions.join}]#{quantifier_affix(format)}" end end end # module Regexp::Expression
Version data entries
67 entries across 54 versions & 12 rubygems