Class: Oppen::Token::String

Inherits:
Oppen::Token show all
Defined in:
lib/oppen/token.rb

Overview

String Token.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ String

Returns a new instance of String.



32
33
34
35
# File 'lib/oppen/token.rb', line 32

def initialize(value)
  @value = value
  super()
end

Instance Attribute Details

#valueString (readonly)

Returns String value.

Returns:



30
31
32
# File 'lib/oppen/token.rb', line 30

def value
  @value
end

Instance Method Details

#lengthInteger

Returns:

  • (Integer)


38
39
40
# File 'lib/oppen/token.rb', line 38

def length
  value.length
end

#to_sString

Returns:



43
44
45
# File 'lib/oppen/token.rb', line 43

def to_s
  value
end