class ROF::Translators::JsonldToRof::PredicateHandler::RegistrySet

@api private Responsible for capturing each of the predicate namespaces URLs that we are handling

Public Class Methods

new() click to toggle source
# File lib/rof/translators/jsonld_to_rof/predicate_handler.rb, line 76
def initialize
  @set = []
end

Public Instance Methods

<<(value) click to toggle source
# File lib/rof/translators/jsonld_to_rof/predicate_handler.rb, line 80
def <<(value)
  @set << value
end
handler_for(predicate) click to toggle source
# File lib/rof/translators/jsonld_to_rof/predicate_handler.rb, line 84
def handler_for(predicate)
  location_extractor = nil
  @set.each do |handler|
    location_extractor = handler.location_extractor_for(predicate)
    break if location_extractor
  end
  raise UnhandledPredicateError.new(predicate, @set.map(&:url)) if location_extractor.nil?
  location_extractor
end