Sha256: 73f8763f6547cc228296485ddb323f87344361440b57d4c2eca6ed478c15e6bf
Contents?: true
Size: 838 Bytes
Versions: 10
Compression:
Stored size: 838 Bytes
Contents
module ROCrate ## # A class to represent a reference within an RO-Crate, to a remote file held on the internet somewhere. # It handles the actual reading/writing of bytes. class RemoteEntry attr_reader :uri ## # Create a new RemoteEntry. # # @param uri [URI] An absolute URI. def initialize(uri) @uri = uri end def write(dest) raise 'Cannot write to a remote entry!' end ## # Read from the source. # def read source.read end ## # @return [IO] An IO object for the remote resource. # def source open(uri) end ## # Does this RemoteEntry point to a directory on the disk? def directory? false end ## # Does this RemoteEntry point to a remote resource? def remote? true end end end
Version data entries
10 entries across 10 versions & 1 rubygems