class Shifty::Gang

Attributes

workers[RW]

Public Class Methods

new(workers=[]) click to toggle source
# File lib/shifty/gang.rb, line 7
def initialize(workers=[])
  link(workers + [])
end

Public Instance Methods

"|"(subscribing_party)
Alias for: supplies
ready_to_work?() click to toggle source
# File lib/shifty/gang.rb, line 19
def ready_to_work?
  workers.first.ready_to_work?
end
roster() click to toggle source
# File lib/shifty/gang.rb, line 11
def roster
  workers
end
shift() click to toggle source
# File lib/shifty/gang.rb, line 15
def shift
  workers.last.shift
end
supplies(subscribing_party) click to toggle source
# File lib/shifty/gang.rb, line 31
def supplies(subscribing_party)
  subscribing_party.supply = self
end
Also aliased as: "|"
supply() click to toggle source
# File lib/shifty/gang.rb, line 23
def supply
  workers.first.supply
end
supply=(source_queue) click to toggle source
# File lib/shifty/gang.rb, line 27
def supply=(source_queue)
  workers.first.supply = source_queue
end

Private Instance Methods