class Attentive::StringToken

Attributes

string[R]

Public Class Methods

new(string, pos=nil) click to toggle source
Calls superclass method Attentive::Token::new
# File lib/attentive/token.rb, line 57
def initialize(string, pos=nil)
  @string = string
  super pos
end

Public Instance Methods

==(other) click to toggle source
# File lib/attentive/token.rb, line 74
def ==(other)
  self.class == other.class && self.string == other.string
end
eql?(other) click to toggle source
# File lib/attentive/token.rb, line 78
def eql?(other)
  self == other
end
hash() click to toggle source
# File lib/attentive/token.rb, line 82
def hash
  [ self.class, string ].hash
end
length() click to toggle source
# File lib/attentive/token.rb, line 70
def length
  string.length
end
to_s() click to toggle source
# File lib/attentive/token.rb, line 66
def to_s
  string
end
to_str() click to toggle source
# File lib/attentive/token.rb, line 62
def to_str
  to_s
end