Method: Pbw::AttachedProcess#tick!

Defined in:
app/models/pbw/attached_process.rb

#tick!Object



17
18
19
20
21
22
23
24
25
26
# File 'app/models/pbw/attached_process.rb', line 17

def tick!
    return unless self.tickable && self.process && (self.token || self.area)
    unless self.ticks_waiting > 0
        self.process.run!(token_or_area)
        destroy
    else
        self.ticks_waiting = self.ticks_waiting - 1
        save!
    end
end