Class: Aerospike::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/aerospike/record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, rec_key, rec_bins, rec_gen, rec_exp) ⇒ Record

Returns a new instance of Record.



27
28
29
30
31
32
33
# File 'lib/aerospike/record.rb', line 27

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

#binsObject (readonly)

Returns the value of attribute bins.



23
24
25
# File 'lib/aerospike/record.rb', line 23

def bins
  @bins
end

#generationObject (readonly)

Returns the value of attribute generation.



23
24
25
# File 'lib/aerospike/record.rb', line 23

def generation
  @generation
end

#keyObject (readonly)

Returns the value of attribute key.



23
24
25
# File 'lib/aerospike/record.rb', line 23

def key
  @key
end

#nodeObject (readonly)

Returns the value of attribute node.



23
24
25
# File 'lib/aerospike/record.rb', line 23

def node
  @node
end

#ttlObject (readonly) Also known as: expiration

Returns the value of attribute ttl.



23
24
25
# File 'lib/aerospike/record.rb', line 23

def ttl
  @ttl
end

Instance Method Details

#to_sObject



35
36
37
# File 'lib/aerospike/record.rb', line 35

def to_s
  "key: `#{key}` bins: `#{bins}` generation: `#{generation}`, ttl: `#{ttl}`"
end