Class: Philiprehberger::StateMachine::Callback

Inherits:
Struct
  • Object
show all
Defined in:
lib/philiprehberger/state_machine/callbacks.rb

Overview

Represents a single callback with optional state filters.

Instance Attribute Summary collapse

Instance Attribute Details

#blockProc (readonly)

the callback to execute

Returns:

  • (Proc)

    the current value of block



10
11
12
# File 'lib/philiprehberger/state_machine/callbacks.rb', line 10

def block
  @block
end

#conditionsHash (readonly)

optional :from and :to filters

Returns:

  • (Hash)

    the current value of conditions



10
11
12
# File 'lib/philiprehberger/state_machine/callbacks.rb', line 10

def conditions
  @conditions
end

#type:before, :after (readonly)

callback timing

Returns:

  • (:before, :after)

    the current value of type



10
11
12
# File 'lib/philiprehberger/state_machine/callbacks.rb', line 10

def type
  @type
end