Class: Regexp::Expression::Backreference::Name

Inherits:
Base show all
Defined in:
lib/regexp_parser/expression/classes/backref.rb

Instance Attribute Summary collapse

Attributes inherited from Regexp::Expression::Base

#conditional_level, #level, #options, #quantifier, #set_level, #text, #token, #ts, #type

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/regexp_parser/expression/classes/backref.rb', line 7

def name
  @name
end