Class: Plumbing::Operation::Transition

Inherits:
Literal::Data
  • Object
show all
Defined in:
lib/plumbing/operation/transition.rb

Overview

One outgoing edge of a state. guard is a proc evaluated in the operation's context; nil means unconditional (the "else" branch). label is the human-readable mermaid edge text.

Instance Method Summary collapse

Instance Method Details

#matches?(operation) ⇒ Boolean

Returns:

  • (Boolean)


13
# File 'lib/plumbing/operation/transition.rb', line 13

def matches?(operation) = guard.nil? || operation.instance_exec(&guard)