lib/big_machine/state.rb in big_machine-1.1.0 vs lib/big_machine/state.rb in big_machine-1.1.1
- old
+ new
@@ -9,9 +9,17 @@
def self.transition_methods
public_instance_methods - State.public_instance_methods
end
+ def self.human_name
+ self.to_s.split('::').last.underscore
+ end
+
+ def human_name
+ self.class.human_name
+ end
+
def transition_to(state_class, *args, &block)
@stateful.transition_to(state_class, *args, &block)
end
def workflow_is(name)