Class: Oppen::PrintStack::PrintStackEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/oppen/print_stack.rb

Overview

Class that represents an item in the print stack.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeToken::BreakType (readonly)

Returns (Called break in the original paper).

Returns:



13
14
15
# File 'lib/oppen/print_stack.rb', line 13

def break_type
  @break_type
end

#offsetInteger (readonly)

Returns Indentation level.

Returns:

  • (Integer)

    Indentation level.



11
12
13
# File 'lib/oppen/print_stack.rb', line 11

def offset
  @offset
end