rename the XX_slot classes to SlottedXX

move to slotted and slots (wip)
This commit is contained in:
2020-02-15 21:02:03 +07:00
parent 8b29326957
commit b7df6f66f9
41 changed files with 96 additions and 58 deletions

View File

@ -31,8 +31,8 @@ module SlotMachine
def initialize(source , left , right, original_source = nil)
super(source)
@left , @right = left , right
@left = Slot.for(@left.shift , @left) if @left.is_a? Array
@right = Slot.for(@right.shift , @right) if @right.is_a? Array
@left = Slotted.for(@left.shift , @left) if @left.is_a? Array
@right = Slotted.for(@right.shift , @right) if @right.is_a? Array
raise "right not SlotMachine, #{@right.to_s}" unless @right.is_a?( Slot )
raise "left not SlotMachine, #{@left.to_s}" unless @left.is_a?( Slot )
@original_source = original_source || self