clayton/consummo

View on GitHub
lib/consummo/enrichers/url_enricher.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Consummo
  class UrlEnricher
    def initialize(resolver: UrlResolver.new)
      @resolver = resolver
    end

    def enrich(item)
      resolved = @resolver.resolve(item.url)
      {url: resolved.to_s}
    end
  end
end