Class: Regexp::Expression::Backreference::Name
- Inherits:
-
Base
- Object
- Regexp::Expression::Base
- Base
- Regexp::Expression::Backreference::Name
- Defined in:
- lib/regexp_parser/expression/classes/backref.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Regexp::Expression::Base
#conditional_level, #level, #options, #quantifier, #set_level, #text, #token, #ts, #type
Instance Method Summary collapse
-
#initialize(token) ⇒ Name
constructor
A new instance of Name.
Methods inherited from Regexp::Expression::Base
#ascii_classes?, #case_insensitive?, #clone, #coded_offset, #default_classes?, #free_spacing?, #full_length, #greedy?, #is?, #match, #matches?, #multiline?, #offset, #one_of?, #possessive?, #quantified?, #quantify, #quantity, #reluctant?, #starts_at, #strfregexp, #terminal?, #to_h, #to_re, #to_s, #type?, #unicode_classes?
Constructor Details
#initialize(token) ⇒ Name
Returns a new instance of Name.
9 10 11 12 |
# File 'lib/regexp_parser/expression/classes/backref.rb', line 9 def initialize(token) @name = token.text[3..-2] super(token) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/regexp_parser/expression/classes/backref.rb', line 7 def name @name end |