Sha256: 5f7af2d7fc24e7839b8b1eab039a2b6c9b29cdb2417711c3a19e830a39288c93
Contents?: true
Size: 787 Bytes
Versions: 12
Compression:
Stored size: 787 Bytes
Contents
## # LDP client for presenting an ORM on top of an LDP resource module Ldp class Client require 'ldp/client/methods' include Ldp::Client::Methods def initialize *http_client initialize_http_client *http_client end # Find or initialize a new LDP resource by URI def find_or_initialize subject, options = {} data = get(subject, options = {}) case when !data.is_a?(Ldp::Response) Resource::BinarySource.new self, subject, data when data.container? Ldp::Container.new_from_response self, subject, data when data.resource? Resource::RdfSource.new self, subject, data else Resource::BinarySource.new self, subject, data end end def logger Ldp.logger end end end
Version data entries
12 entries across 12 versions & 1 rubygems