Class: Aerospike::Record
- Inherits:
-
Object
- Object
- Aerospike::Record
- Defined in:
- lib/aerospike/record.rb
Instance Attribute Summary collapse
-
#bins ⇒ Object
readonly
Returns the value of attribute bins.
-
#generation ⇒ Object
readonly
Returns the value of attribute generation.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#ttl ⇒ Object
(also: #expiration)
readonly
Returns the value of attribute ttl.
Instance Method Summary collapse
-
#initialize(node, rec_key, rec_bins, rec_gen, rec_exp) ⇒ Record
constructor
A new instance of Record.
- #to_s ⇒ Object
Constructor Details
#initialize(node, rec_key, rec_bins, rec_gen, rec_exp) ⇒ Record
Returns a new instance of Record.
28 29 30 31 32 33 34 |
# File 'lib/aerospike/record.rb', line 28 def initialize(node, rec_key, rec_bins, rec_gen, rec_exp) @key = rec_key @bins = rec_bins @generation = rec_gen @ttl = expiration_to_ttl(rec_exp) @node = node end |
Instance Attribute Details
#bins ⇒ Object (readonly)
Returns the value of attribute bins.
24 25 26 |
# File 'lib/aerospike/record.rb', line 24 def bins @bins end |
#generation ⇒ Object (readonly)
Returns the value of attribute generation.
24 25 26 |
# File 'lib/aerospike/record.rb', line 24 def generation @generation end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
24 25 26 |
# File 'lib/aerospike/record.rb', line 24 def key @key end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
24 25 26 |
# File 'lib/aerospike/record.rb', line 24 def node @node end |
#ttl ⇒ Object (readonly) Also known as: expiration
Returns the value of attribute ttl.
24 25 26 |
# File 'lib/aerospike/record.rb', line 24 def ttl @ttl end |
Instance Method Details
#to_s ⇒ Object
38 39 40 |
# File 'lib/aerospike/record.rb', line 38 def to_s "key: `#{key}` bins: `#{bins}` generation: `#{generation}`, ttl: `#{ttl}`" end |