Class: Regexp::Expression::CharacterSet
- Inherits:
-
Subexpression
- Object
- Base
- Subexpression
- Regexp::Expression::CharacterSet
- Defined in:
- lib/regexp_parser/expression/classes/character_set.rb,
lib/regexp_parser/expression/classes/character_set/range.rb,
lib/regexp_parser/expression/classes/character_set/intersection.rb
Defined Under Namespace
Classes: IntersectedSequence, Intersection, Range
Instance Attribute Summary collapse
-
#closed ⇒ Object
(also: #closed?)
Returns the value of attribute closed.
-
#negative ⇒ Object
Returns the value of attribute negative.
Attributes inherited from Subexpression
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(token, options = {}) ⇒ CharacterSet
constructor
A new instance of CharacterSet.
- #negate ⇒ Object
Methods inherited from Subexpression
#<<, #dig, #each_expression, #extract_quantifier_target, #flat_map, #initialize_copy, #inner_match_length, #match_length, #strfregexp_tree, #te, #to_h, #traverse
Methods inherited from Base
#ascii_classes?, #case_insensitive?, #default_classes?, #free_spacing?, #greedy?, #match, #match?, #multiline?, #possessive?, #quantify, #quantity, #reluctant?, #repetitions, #strfregexp, #to_h, #to_re, #unicode_classes?, #unquantified_clone
Methods included from Shared
#==, #base_length, #coded_offset, #ends_at, #full_length, #human_name, included, #initialize_copy, #inspect, #is?, #negated?, #negative?, #nesting_level=, #offset, #one_of?, #optional?, #parts, #pre_quantifier_decoration, #pretty_print, #pretty_print_instance_variables, #quantified?, #quantifier=, #quantifier_affix, #starts_at, #to_s, #token_class, #type?
Constructor Details
#initialize(token, options = {}) ⇒ CharacterSet
Returns a new instance of CharacterSet.
6 7 8 9 10 |
# File 'lib/regexp_parser/expression/classes/character_set.rb', line 6 def initialize(token, = {}) self.negative = false self.closed = false super end |
Instance Attribute Details
#closed ⇒ Object Also known as: closed?
Returns the value of attribute closed.
3 4 5 |
# File 'lib/regexp_parser/expression/classes/character_set.rb', line 3 def closed @closed end |
#negative ⇒ Object
Returns the value of attribute negative.
3 4 5 |
# File 'lib/regexp_parser/expression/classes/character_set.rb', line 3 def negative @negative end |
Instance Method Details
#close ⇒ Object
16 17 18 |
# File 'lib/regexp_parser/expression/classes/character_set.rb', line 16 def close self.closed = true end |
#negate ⇒ Object
12 13 14 |
# File 'lib/regexp_parser/expression/classes/character_set.rb', line 12 def negate self.negative = true end |