lib/stateflow/machine.rb in stateflow-0.0.1 vs lib/stateflow/machine.rb in stateflow-0.0.2
- old
+ new
@@ -4,9 +4,13 @@
def initialize(&machine)
@states, @events = Hash.new, Hash.new
instance_eval(&machine)
end
+
+ def state_column(name = nil)
+ @state_column ||= name.nil? ? :state : name
+ end
private
def initial(name)
@initial_state_name = name
end
\ No newline at end of file