Class: Aerospike::Exp::Regex

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, #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, 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(bin, regex, flags) ⇒ Regex

Returns a new instance of Regex.



1099
1100
1101
1102
1103
# File 'lib/aerospike/exp/exp.rb', line 1099

def initialize(bin, regex, flags)
  @bin = bin
  @regex = regex
  @flags = flags
end

Instance Attribute Details

#binObject (readonly)

Returns the value of attribute bin.



1095
1096
1097
# File 'lib/aerospike/exp/exp.rb', line 1095

def bin
  @bin
end

#flagsObject (readonly)

Returns the value of attribute flags.



1097
1098
1099
# File 'lib/aerospike/exp/exp.rb', line 1097

def flags
  @flags
end

#regexObject (readonly)

Returns the value of attribute regex.



1096
1097
1098
# File 'lib/aerospike/exp/exp.rb', line 1096

def regex
  @regex
end

Instance Method Details

#pack(packer) ⇒ Object



1105
1106
1107
1108
1109
1110
1111
# File 'lib/aerospike/exp/exp.rb', line 1105

def pack(packer)
  packer.write_array_header(4)
  packer.write(REGEX)
  packer.write(@flags)
  packer.write(@regex)
  @bin.pack(packer)
end