Sha256: f5214b919b87bd920c85e1e1f7f74135b662ba8ca0e1b81979f895a764277ca8
Contents?: true
Size: 703 Bytes
Versions: 12
Compression:
Stored size: 703 Bytes
Contents
module NxtStateMachine class Transition::Proxy def initialize(event, state_machine, transition, context) @event = event @transition = transition @state_machine = state_machine @context = context end def call(&block) proxy = if block.arity == 1 Proc.new do block.call(transition.block) end else block end around_callback_chain(proxy).call end private def around_callback_chain(proxy) @around_callback_chain ||= Transition::AroundCallbackChain.new(transition, context, state_machine).build(proxy) end attr_reader :proxy, :transition, :state_machine, :context, :event end end
Version data entries
12 entries across 12 versions & 1 rubygems