Skip to content

Commit

Permalink
Merge branch 'master' into feature/add_optional_initial_transition
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenbinns authored Jan 5, 2024
2 parents ee0eaab + 23f42c6 commit 4f4d3f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/statesman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Statesman
autoload :Callback, "statesman/callback"
autoload :Guard, "statesman/guard"
autoload :Utils, "statesman/utils"
autoload :Version, "statesman/version"
autoload :VERSION, "statesman/version"
module Adapters
autoload :Memory, "statesman/adapters/memory"
autoload :ActiveRecord, "statesman/adapters/active_record"
Expand Down
4 changes: 2 additions & 2 deletions lib/statesman/callback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ def matches_all_transitions
end

def matches_from_state(from, to)
(from == self.from && (to.nil? || self.to.empty?))
from == self.from && (to.nil? || self.to.empty?)
end

def matches_to_state(from, to)
((from.nil? || self.from.nil?) && self.to.include?(to))
(from.nil? || self.from.nil?) && self.to.include?(to)
end

def matches_both_states(from, to)
Expand Down

0 comments on commit 4f4d3f1

Please sign in to comment.