Class: Regexp::Token

Inherits:
Struct
  • Object
show all
Defined in:
lib/regexp_parser/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nextObject

Returns the value of attribute next.



14
15
16
# File 'lib/regexp_parser/token.rb', line 14

def next
  @next
end

#previousObject

Returns the value of attribute previous.



14
15
16
# File 'lib/regexp_parser/token.rb', line 14

def previous
  @previous
end

Instance Method Details

#lengthObject



20
21
22
# File 'lib/regexp_parser/token.rb', line 20

def length
  te - ts
end

#offsetObject



16
17
18
# File 'lib/regexp_parser/token.rb', line 16

def offset
  [ts, te]
end