Sha256: 6b1bee60366ec5fc9832ecdcbf9c1995b6e5ff9a3a39ca47fd78dd66c7dd8da7
Contents?: true
Size: 450 Bytes
Versions: 7
Compression:
Stored size: 450 Bytes
Contents
class State attr_reader :holder, :previous_state_class def initialize(holder, previous_state_class) @holder = holder @previous_state_class = previous_state_class end private def transition_to(new_state_class) holder.transition_to(new_state_class) end def enter raise "#{self.class.name} does not implement #enter." end def exit raise "#{self.class.name} does not implement #exit." end end
Version data entries
7 entries across 7 versions & 1 rubygems