Class: Oppen::PrintStack::PrintStackEntry
- Inherits:
-
Object
- Object
- Oppen::PrintStack::PrintStackEntry
- Defined in:
- lib/oppen/print_stack.rb
Overview
Class that represents an item in the print stack.
Instance Attribute Summary collapse
-
#break_type ⇒ Token::BreakType
readonly
(Called break in the original paper).
-
#offset ⇒ Integer
readonly
Indentation level.
Instance Method Summary collapse
-
#initialize(offset, break_type) ⇒ PrintStackEntry
constructor
A new instance of PrintStackEntry.
Constructor Details
#initialize(offset, break_type) ⇒ PrintStackEntry
Returns a new instance of PrintStackEntry.
15 16 17 18 |
# File 'lib/oppen/print_stack.rb', line 15 def initialize(offset, break_type) @offset = offset @break_type = break_type end |
Instance Attribute Details
#break_type ⇒ Token::BreakType (readonly)
Returns (Called break in the original paper).
13 14 15 |
# File 'lib/oppen/print_stack.rb', line 13 def break_type @break_type end |
#offset ⇒ Integer (readonly)
Returns Indentation level.
11 12 13 |
# File 'lib/oppen/print_stack.rb', line 11 def offset @offset end |