Class: Oppen::PrintStack::PrintStackEntry
- Inherits:
-
Object
- Object
- Oppen::PrintStack::PrintStackEntry
- Defined in:
- lib/oppen/print_stack.rb
Overview
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.
16 17 18 19 |
# File 'lib/oppen/print_stack.rb', line 16 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.
11 12 13 |
# File 'lib/oppen/print_stack.rb', line 11 def break_type @break_type end |
#offset ⇒ Integer (readonly)
Returns Indentation level.
14 15 16 |
# File 'lib/oppen/print_stack.rb', line 14 def offset @offset end |