Class: Oppen::Token::String
- Inherits:
-
Oppen::Token
- Object
- Oppen::Token
- Oppen::Token::String
- Defined in:
- lib/oppen/token.rb
Overview
String Token.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ String
readonly
String value.
- #width ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(value, width: value.length) ⇒ String
constructor
A new instance of String.
- #to_s ⇒ String
Constructor Details
#initialize(value, width: value.length) ⇒ String
Returns a new instance of String.
32 33 34 35 36 |
# File 'lib/oppen/token.rb', line 32 def initialize(value, width: value.length) @value = value @width = width super() end |
Instance Attribute Details
#value ⇒ String (readonly)
Returns String value.
28 29 30 |
# File 'lib/oppen/token.rb', line 28 def value @value end |
#width ⇒ Integer (readonly)
30 31 32 |
# File 'lib/oppen/token.rb', line 30 def width @width end |