Sha256: 47b88e4d1f441f3fceae1f78c56ae34d3dfc7e03369ba4d4e3c6d3e84d55f7e6
Contents?: true
Size: 407 Bytes
Versions: 4
Compression:
Stored size: 407 Bytes
Contents
class NullState # Avoid chicken and egg problem by mimicing rather than inheriting from State attr_reader :holder def initialize(holder:, opts: {}) @holder = holder @holder.__send__(:add_state, self) end def name 'NullState' end alias :to_s :name def symbol :NullState end private def transition_to(state) end def enter end def exit end end
Version data entries
4 entries across 4 versions & 1 rubygems