Class: Org::State

Inherits:
Struct
  • Object
show all
Defined in:
lib/org/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

Returns the value of attribute parent

Returns:

  • (Object)

    the current value of parent



2
3
4
# File 'lib/org/state.rb', line 2

def parent
  @parent
end

#scannerObject

Returns the value of attribute scanner

Returns:

  • (Object)

    the current value of scanner



2
3
4
# File 'lib/org/state.rb', line 2

def scanner
  @scanner
end

#scopeObject

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



2
3
4
# File 'lib/org/state.rb', line 2

def scope
  @scope
end

Instance Method Details

#stepObject



3
4
5
6
7
8
9
10
# File 'lib/org/state.rb', line 3

def step
  loop do
    # before = scanner.string[0...scanner.pos][-25, 25]
    # after = scanner.string[scanner.pos..-1][0, 50]
    # p "%40s@%40s" % [before, after]
    break unless scope.step(self)
  end
end