lib/mutator/helpers.rb in mutator-0.1.0 vs lib/mutator/helpers.rb in mutator-0.2.0

- old
+ new

@@ -2,20 +2,20 @@ module Helpers def machine @machine ||= machine_class.new(self) end - def self.included(base) + def self.included base Mutator.const_get(base.name, false).states.each do |state| base.send(:define_singleton_method, state) do - self.where(state: state) + where state: state end end end protected def machine_class - Mutator.const_get(self.class.name, false) + Mutator.const_get self.class.name, false end end end