Class: Regexp::Expression::Root
- Inherits:
-
Subexpression
- Object
- Base
- Subexpression
- Regexp::Expression::Root
- Defined in:
- lib/regexp_parser/expression/classes/root.rb
Instance Attribute Summary
Attributes inherited from Subexpression
Attributes inherited from Base
#conditional_level, #level, #nesting_level, #options, #quantifier, #set_level, #text, #token, #ts, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Root
constructor
TODO: this override is here for backwards compatibility, remove in 2.0.0.
Methods inherited from Subexpression
#<<, #dig, #each_expression, #flat_map, #initialize_clone, #strfregexp_tree, #te, #to_h, #to_s, #traverse
Methods inherited from Base
#ascii_classes?, #attributes, #case_insensitive?, #coded_offset, #default_classes?, #free_spacing?, #full_length, #greedy?, #initialize_clone, #is?, #match, #matches?, #multiline?, #offset, #one_of?, #possessive?, #quantified?, #quantifier_affix, #quantify, #quantity, #reluctant?, #strfregexp, #terminal?, #to_re, #to_s, #type?, #unicode_classes?
Constructor Details
#initialize(*args) ⇒ Root
TODO: this override is here for backwards compatibility, remove in 2.0.0
5 6 7 8 9 10 11 12 |
# File 'lib/regexp_parser/expression/classes/root.rb', line 5 def initialize(*args) unless args.first.is_a?(Regexp::Token) warn('WARNING: Root.new without a Token argument is deprecated and '\ 'will be removed in 2.0.0. Use Root.build for the old behavior.') return super(self.class.build_token, *args) end super end |
Class Method Details
.build(options = {}) ⇒ Object
15 16 17 |
# File 'lib/regexp_parser/expression/classes/root.rb', line 15 def build( = {}) new(build_token, ) end |