class Ruian::Queue

Attributes

importer[RW]

Public Class Methods

new(importer) click to toggle source
# File lib/ruian/queue.rb, line 7
def initialize(importer)
  self.importer = importer
end

Public Instance Methods

callback(key, obj) click to toggle source
# File lib/ruian/queue.rb, line 16
def callback(key, obj)
  self.importer.send(callback_key(key), obj)
end
callback_key(key) click to toggle source
# File lib/ruian/queue.rb, line 20
def callback_key(key)
  "import_#{key}"
end
push(obj) click to toggle source
# File lib/ruian/queue.rb, line 11
def push(obj)
  key = obj.class.to_s.split('::').last.downcase
  callback(key, obj)
end