Class: Aerospike::Exp::CmdExp

Inherits:
Aerospike::Exp show all
Defined in:
lib/aerospike/exp/exp.rb

Constant Summary

Constants inherited from Aerospike::Exp

MODIFY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Aerospike::Exp

abs, add, and, arshift, bin, bin_exists, bin_type, blob_bin, blob_val, bool_bin, bool_val, build, #bytes, ceil, cond, count, def, device_size, digest_modulo, div, eq, exclusive, float_bin, float_val, floor, ge, geo, geo_bin, geo_compare, gt, hll_bin, int_and, int_bin, int_not, int_or, int_val, int_xor, is_tombstone, key, key_exists, last_update, le, let, list_bin, list_val, log, lscan, lshift, lt, map_bin, map_val, max, memory_size, min, mod, mul, ne, nil_val, not, or, pow, record_size, regex_compare, rscan, rshift, set_name, since_update, #size, str_bin, str_val, sub, to_float, to_int, ttl, unknown, var, void_time, #write

Constructor Details

#initialize(cmd, *exps) ⇒ CmdExp

Returns a new instance of CmdExp.



1181
1182
1183
1184
# File 'lib/aerospike/exp/exp.rb', line 1181

def initialize(cmd, *exps)
  @exps = exps
  @cmd = cmd
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



1179
1180
1181
# File 'lib/aerospike/exp/exp.rb', line 1179

def cmd
  @cmd
end

#expsObject (readonly)

Returns the value of attribute exps.



1178
1179
1180
# File 'lib/aerospike/exp/exp.rb', line 1178

def exps
  @exps
end

Instance Method Details

#pack(packer) ⇒ Object



1186
1187
1188
1189
1190
1191
1192
# File 'lib/aerospike/exp/exp.rb', line 1186

def pack(packer)
  packer.write_array_header(@exps.length + 1)
  packer.write(@cmd)
  @exps.each do |exp|
    exp.pack(packer)
  end
end