Class: Oppen::PrintStack::PrintStackEntry

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

Overview

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.



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

Returns Called break in the original paper.

Returns:

  • (Token::BreakType)

    Called break in the original paper.



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

def break_type
  @break_type
end

#offsetInteger (readonly)

Returns Indentation level.

Returns:

  • (Integer)

    Indentation level.



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

def offset
  @offset
end