restfully 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -96,6 +96,12 @@ module Restfully
|
|
96
96
|
def unserialized
|
97
97
|
@unserialized ||= self.class.unserialize(@io)
|
98
98
|
end
|
99
|
+
|
100
|
+
# Returns a string to display after the URI when pretty-printing
|
101
|
+
# objects.
|
102
|
+
def banner
|
103
|
+
nil
|
104
|
+
end
|
99
105
|
|
100
106
|
# Without argument, returns the properties Hash obtained from calling
|
101
107
|
# #unserialized.
|
data/lib/restfully/resource.rb
CHANGED
@@ -58,7 +58,11 @@ module Restfully
|
|
58
58
|
# Returns the "signature" of the resource. Used for (pretty-)inspection.
|
59
59
|
def signature(closed=true)
|
60
60
|
s = "#<#{kind}:0x#{object_id.to_s(16)}"
|
61
|
-
s +=
|
61
|
+
s += media_type.banner unless media_type.banner.nil?
|
62
|
+
# Only display path if host and port are the same than session's URI:
|
63
|
+
s += " uri=#{[uri.host, uri.port] == [
|
64
|
+
session.uri.host, session.uri.port
|
65
|
+
] ? uri.request_uri.inspect : uri.to_s.inspect}"
|
62
66
|
s += ">" if closed
|
63
67
|
s
|
64
68
|
end
|
data/lib/restfully/version.rb
CHANGED
metadata
CHANGED