Class: Aerospike::StringValue
- Defined in:
- lib/aerospike/value/value.rb
Overview
value string.
Instance Method Summary collapse
- #estimate_size ⇒ Object
- #get ⇒ Object
-
#initialize(val) ⇒ StringValue
constructor
:nodoc:.
- #pack(packer) ⇒ Object
- #to_bytes ⇒ Object
- #to_s ⇒ Object
- #to_sym ⇒ Object
- #type ⇒ Object
- #write(buffer, offset) ⇒ Object
Methods inherited from Value
Constructor Details
#initialize(val) ⇒ StringValue
:nodoc:
248 249 250 251 |
# File 'lib/aerospike/value/value.rb', line 248 def initialize(val) @value = val || "" self end |
Instance Method Details
#estimate_size ⇒ Object
253 254 255 |
# File 'lib/aerospike/value/value.rb', line 253 def estimate_size @value.bytesize end |
#get ⇒ Object
270 271 272 |
# File 'lib/aerospike/value/value.rb', line 270 def get @value end |
#pack(packer) ⇒ Object
262 263 264 |
# File 'lib/aerospike/value/value.rb', line 262 def pack(packer) packer.write(Aerospike::ParticleType::STRING.chr + @value) end |
#to_bytes ⇒ Object
274 275 276 |
# File 'lib/aerospike/value/value.rb', line 274 def to_bytes @value end |
#to_s ⇒ Object
278 279 280 |
# File 'lib/aerospike/value/value.rb', line 278 def to_s @value end |
#to_sym ⇒ Object
282 283 284 |
# File 'lib/aerospike/value/value.rb', line 282 def to_sym @value.to_sym end |
#type ⇒ Object
266 267 268 |
# File 'lib/aerospike/value/value.rb', line 266 def type Aerospike::ParticleType::STRING end |