lib/ldp/resource/binary_source.rb in ldp-0.4.1 vs lib/ldp/resource/binary_source.rb in ldp-0.5.0
- old
+ new
@@ -15,16 +15,24 @@
def content
@content ||= get.body
end
def described_by
- client.find_or_initialize Array(Ldp::Response.links(self)["describedby"]).first
+ described_by = Array(head.links["describedby"]).first
+
+ client.find_or_initialize described_by if described_by
end
# Override inspect so that `content` is never shown. It is typically too big to be helpful
def inspect
string = "#<#{self.class.name}:#{self.object_id} "
fields = [:subject].map{|field| "#{field}=\"#{self.send(field)}\""}
string << fields.join(", ") << ">"
+ end
+
+ protected
+
+ def interaction_model
+ RDF::Vocab::LDP.NonRDFSource
end
end
end