class Webmachine::WeakETag
A Weak Entity Tag, which can be used to compare entities which are semantically equivalent, but do not have the same byte-content. A WeakETag
is equivalent to another entity tag if the non-weak portions are equivalent. It is also equivalent to a String which represents the equivalent strong or weak ETag
.
Public Instance Methods
to_s()
click to toggle source
Converts the WeakETag
to a String for use in a header.
# File lib/webmachine/etags.rb, line 51 def to_s "W/#{super}" end
Private Instance Methods
quote(str)
click to toggle source
Calls superclass method
Webmachine::QuotedString#quote
# File lib/webmachine/etags.rb, line 65 def quote(str) str = unescape_quotes($1) if str =~ WEAK_ETAG super end
unquote(str)
click to toggle source
Calls superclass method
Webmachine::QuotedString#unquote
# File lib/webmachine/etags.rb, line 57 def unquote(str) if str =~ WEAK_ETAG unescape_quotes $1 else super end end