lib/big_machine/state.rb in big_machine-1.0.1 vs lib/big_machine/state.rb in big_machine-1.1.0

- old
+ new

@@ -1,29 +1,30 @@ -module BigMachine - class State - - attr_reader :stateful - - def initialize(stateful) - @stateful = stateful - enter - end - - def self.transition_methods - public_instance_methods - State.public_instance_methods - end - - def transition_to(state_class) - @stateful.transition_to(state_class) - end - - def workflow_is(name) - @stateful.workflow == name - end - - def enter - end - - def exit - end - end -end \ No newline at end of file +module BigMachine + class State + + attr_reader :stateful + + def initialize(stateful) + @stateful = stateful + end + + def self.transition_methods + public_instance_methods - State.public_instance_methods + end + + def transition_to(state_class, *args, &block) + @stateful.transition_to(state_class, *args, &block) + end + + def workflow_is(name) + @stateful.workflow == name + end + + def enter(*args, &block) + true + end + + def exit(*args, &block) + true + end + end +end