Skip to content

Instantly share code, notes, and snippets.

@johnkpaul
Created November 6, 2016 20:35
Show Gist options
  • Save johnkpaul/abf55b98e5e5436a3c37b61c9a747897 to your computer and use it in GitHub Desktop.
Save johnkpaul/abf55b98e5e5436a3c37b61c9a747897 to your computer and use it in GitHub Desktop.
module Statesman
module Machine
class << self
alias_method :state_original, :state
end
def self.state name, args
binding.pry
state_original(name, args)
end
end
end
class ItemStateMachine
include Statesman::Machine
state :new, initial: true
state :pending_tech_review
state :nw_can_repair
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment