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
- #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.
19 20 21 22 23 |
# File 'lib/oppen/token.rb', line 19 def initialize(value, width: value.length) @value = value @width = width super() end |
Instance Attribute Details
#width ⇒ Integer (readonly)
17 18 19 |
# File 'lib/oppen/token.rb', line 17 def width @width end |