Sha256: cd18cf8d961f18ba10c0efcc69caba7b6e00ef1cf8744be2e701f2762a94b0a5
Contents?: true
Size: 480 Bytes
Versions: 1
Compression:
Stored size: 480 Bytes
Contents
class MachineTestSubject include Transitions state_machine :initial => :open do state :open state :closed event :shutdown do transitions :from => :open, :to => :closed end event :timeout do transitions :from => :open, :to => :closed end event :restart do transitions :from => :closed, to: :open, guard: :restart_allowed? end end def restart_allowed?(allowed = true) allowed end def event_failed(*) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
transitions-0.2.0 | test/machine/machine_template.rb |