class Libis::Ingester::Labeler
Protected Instance Methods
get_label(name, _item)
click to toggle source
# File lib/libis/ingester/tasks/labeler.rb, line 35 def get_label(name, _item) name end
process(item)
click to toggle source
# File lib/libis/ingester/tasks/labeler.rb, line 21 def process(item) lookup = eval(parameter(:lookup_expr)) if (label = get_label(lookup, item)) item.label = label item.save! debug 'Item %s labeled as %s', item, item.name, item.label end if thumbnail?(lookup) item.options['use_as_thumbnail'] = true item.save! debug 'Item %s marked as thumbnail', item, item.name end end
thumbnail?(name)
click to toggle source
# File lib/libis/ingester/tasks/labeler.rb, line 39 def thumbnail?(name) false end