Module: MyMachine
- Included in:
- MyEventMachineDojin, MyMachineAnime44, MyMachineAnisoku
- Defined in:
- lib/lib/machine.rb
Overview
Module of Machine
this class has queue of jobs.controll jobs and run jobs
Instance Method Summary collapse
Instance Method Details
#go ⇒ Object
21 22 23 |
# File 'lib/lib/machine.rb', line 21 def go raise "You need write the go method!" end |
#initialize(args = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/lib/machine.rb', line 9 def initialize(args={}) require 'thread' require 'pp' @queue = Queue.new @debug = args[:debug]||= false end |
#retry(job) ⇒ Object
25 26 27 |
# File 'lib/lib/machine.rb', line 25 def retry(job) @queue.push job end |
#setup ⇒ Object
16 17 18 19 |
# File 'lib/lib/machine.rb', line 16 def setup setupjobs setupmachine end |