Sha256: 7187abbf05eb9e046a96718fd28304dd179c47c38984ea875ca40e3ea6d40418
Contents?: true
Size: 424 Bytes
Versions: 2
Compression:
Stored size: 424 Bytes
Contents
module Mutator class Transition attr_reader :to, :from, :machine def initialize(to:, from:, machine:) @to, @from, @machine = to, from, machine end def valid? transitions.present? end def stateholder machine.stateholder end protected def transitions machine.transitions.select do |t| t[:to] == to && t[:from].include?(from) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mutator-0.0.2 | lib/mutator/transition.rb |
mutator-0.0.1 | lib/mutator/transition.rb |