Class: Ripple::Document::Link

Inherits:
Riak::Link
  • Object
show all
Defined in:
lib/ripple/document/link.rb

Overview

A Link that is tied to a particular document and tag. The key is fetched from the document lazily when needed.

Instance Method Summary collapse

Constructor Details

#initialize(document, tag) ⇒ Link

Returns a new instance of Link.



11
12
13
14
# File 'lib/ripple/document/link.rb', line 11

def initialize(document, tag)
  @document = document
  super(document.class.bucket_name, nil, tag)
end

Instance Method Details

#hashObject



20
21
22
# File 'lib/ripple/document/link.rb', line 20

def hash
  document.hash
end

#keyObject



16
17
18
# File 'lib/ripple/document/link.rb', line 16

def key
  document.key
end