class Libis::Ingester::Task

Public Class Methods

description(text = nil) click to toggle source
# File lib/libis/ingester/task.rb, line 19
def self.description(text = nil)
  @description ||= (text || '')
  @description
end
help(text = nil) click to toggle source
# File lib/libis/ingester/task.rb, line 24
def self.help(text = nil)
  @helptext ||= (text || '')
  @helptext
end
taskgroup(name = nil) click to toggle source
# File lib/libis/ingester/task.rb, line 14
def self.taskgroup(name = nil)
  @taskgroup = name if name
  @taskgroup || superclass.group rescue nil
end

Public Instance Methods

run(item) click to toggle source
Calls superclass method
# File lib/libis/ingester/task.rb, line 29
def run(item)
  new_item = super(item)
  item = new_item if new_item.is_a?(Libis::Workflow::WorkItem)
  item.reload
  item.reload_relations
  item
end

Protected Instance Methods

pre_process(item) click to toggle source
# File lib/libis/ingester/task.rb, line 39
def pre_process(item)
  skip_processing_item unless parameter(:item_types).blank? ||
      parameter(:item_types).any? { |klass| item.is_a?(klass.to_s.constantize) }
end