lib/simplestate/null_state.rb in simplestate-2.0.6 vs lib/simplestate/null_state.rb in simplestate-2.0.7

- old
+ new

@@ -1,15 +1,12 @@ class NullState # Simplifies call via super to SimpleDelegator during StateHolder#new # Avoid chicken and egg problem by mimicing rather than inheriting from State attr_reader :holder - def initialize(holder: nil, opts: {}) + def initialize(holder:, opts: {}) @holder = holder - end - - def self.list - {} + @holder.__send__(:add_state, self) end def name 'NullState' end