Sha256: f9e0e9fb533e2699079e458e818c0239a29f532b8a8fd828b57c39a020a403c3

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

module Annal
  class Fetch
    attr_accessor :path, :file
    def initialize(file_identifier)
      self.file = if file_identifier.respond_to?(:read)
        file_identifier
      else
        File.open(file_identifier)
      end
    end

    def local?
      true
    end

    def read
      @read ||= file.read
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
annal-0.0.2 lib/annal/fetch.rb
annal-0.0.1 lib/annal/fetch.rb