Class: ZugZug::QuarterMaster

Inherits:
Object
  • Object
show all
Defined in:
lib/zug_zug/quarter_master.rb

Instance Method Summary collapse

Constructor Details

#initialize(faction = HORDE) ⇒ QuarterMaster

Returns a new instance of QuarterMaster.



5
6
7
# File 'lib/zug_zug/quarter_master.rb', line 5

def initialize(faction = HORDE)
  @soundboard = Soundboard.new(faction)
end

Instance Method Details

#checked_out!(argv) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/zug_zug/quarter_master.rb', line 9

def checked_out!(argv)
  previous_head, new_head, branch_flag = argv
  
  if branch_flag == "1" && new_head == previous_head
    @soundboard.work_starts
  end
end

#merged!(argv) ⇒ Object



17
18
19
# File 'lib/zug_zug/quarter_master.rb', line 17

def merged!(argv)
  @soundboard.work_is_over
end