lib/simplestate/state_holder.rb in simplestate-2.0.12 vs lib/simplestate/state_holder.rb in simplestate-2.0.13

- old
+ new

@@ -2,14 +2,18 @@ attr_reader :initial_state def initialize( initial_state: nil, state_history: StateHistory.new, state_list: StateList.new, - opts: {}) + opts: nil ) @initial_state = initial_state @state_history = state_history @state_list = state_list - super + @opts = opts + # opts is provided to allow super to be used 'bare' in the argument list of descendents. + # It will be silently ignored here. In the descendent opts may be anything, + # but a configuration object or a hash paired with appropriate accessors is recommended. + super end def start(init_state=initial_state) enter_new_state(init_state) end