Sha256: 2ed464468dab58c59aeee2d69699fe18ece25ec43f154e78567779b7d9001145

Contents?: true

Size: 540 Bytes

Versions: 3

Compression:

Stored size: 540 Bytes

Contents

# frozen_string_literal: true

module Trifle
  module Docs
    module Harvester
      module File
        class Sieve < Harvester::Sieve
          def match?
            true
          end

          def to_url
            file.gsub(%r{^#{path}/}, '')
          end
        end

        class Conveyor < Harvester::Conveyor
          def content
            data
          end

          def meta
            {
              'path' => file,
              'type' => 'file'
            }
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trifle-docs-0.2.0 lib/trifle/docs/harvester/file.rb
trifle-docs-0.1.1 lib/trifle/docs/harvester/file.rb
trifle-docs-0.1.0 lib/trifle/docs/harvester/file.rb