lib/riak/riak_content.rb in riakpb-0.1.3 vs lib/riak/riak_content.rb in riakpb-0.1.4
- old
+ new
@@ -136,10 +136,11 @@
else
raise TypeError.new t('invalid_tag')
end
end # tags.each do |tag, link|
end
+ alias :link :link_key
# Set the links to other Key in riak.
# @param [RpbGetResp, RpbPutResp] contains the tag/bucket/key of a given link
# @return [Set] links that this RiakContent points to
def links=(pb_links)
@@ -191,11 +192,11 @@
rpb_content.content_type = @content_type unless @content_type.nil?
rpb_content.charset = @charset unless @charset.nil? # || @charset.empty?
rpb_content.content_encoding = @content_encoding unless @content_encoding.nil? # || @content_encoding.empty?
rpb_content.vtag = @vtag unless @vtag.nil?
- rpb_content.links = rpb_links unless rpb_links.empty?
- rpb_content.usermeta = usermeta unless usermeta.empty?
+ rpb_content.links = rpb_links unless rpb_links.nil?
+ rpb_content.usermeta = usermeta unless usermeta.nil?
return(rpb_content)
end
# @return [String] A representation suitable for IRB and debugging output