Sha256: 2abb6a85a85b5683f0467f910bb6a2dbcec34e8bc06c73b237a8670c1d9a3a0e

Contents?: true

Size: 434 Bytes

Versions: 5

Compression:

Stored size: 434 Bytes

Contents

# frozen_string_literal: true

module Trifle
  module Docs
    module Operations
      class Content
        attr_reader :url

        def initialize(**keywords)
          @url = keywords.fetch(:url)
          @config = keywords[:config]
        end

        def config
          @config || Trifle::Docs.default
        end

        def perform
          config.harvester.content_for(url: url)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trifle-docs-0.3.1 lib/trifle/docs/operations/content.rb
trifle-docs-0.3.0 lib/trifle/docs/operations/content.rb
trifle-docs-0.2.0 lib/trifle/docs/operations/content.rb
trifle-docs-0.1.1 lib/trifle/docs/operations/content.rb
trifle-docs-0.1.0 lib/trifle/docs/operations/content.rb