class Safrano::InplaceTransition

Transition that does not move/change the input

Public Class Methods

new(trans:) click to toggle source
# File lib/odata/transition.rb, line 58
def initialize(trans:)
  @trans = trans
end

Public Instance Methods

do_match(str) click to toggle source
# File lib/odata/transition.rb, line 62
def do_match(str)
  @str = str
end
do_transition(ctx) click to toggle source
# File lib/odata/transition.rb, line 74
def do_transition(ctx)
  ctx.method(@trans).call(@str)
end
path_done() click to toggle source
# File lib/odata/transition.rb, line 70
def path_done
  EMPTYSTR
end
path_remain() click to toggle source
# File lib/odata/transition.rb, line 66
def path_remain
  @str
end