Class: Libcouchbase::Connection::Request

Inherits:
Struct
  • Object
show all
Defined in:
lib/libcouchbase/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cmdObject

Returns the value of attribute cmd

Returns:

  • (Object)

    the current value of cmd



31
32
33
# File 'lib/libcouchbase/connection.rb', line 31

def cmd
  @cmd
end

#deferObject

Returns the value of attribute defer

Returns:

  • (Object)

    the current value of defer



31
32
33
# File 'lib/libcouchbase/connection.rb', line 31

def defer
  @defer
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



31
32
33
# File 'lib/libcouchbase/connection.rb', line 31

def key
  @key
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



31
32
33
# File 'lib/libcouchbase/connection.rb', line 31

def value
  @value
end

Instance Method Details

#ref(string) ⇒ Object

We need to hold a reference to c-strings so they are not GC’d



33
34
35
36
37
38
# File 'lib/libcouchbase/connection.rb', line 33

def ref(string)
    @refs ||= []
    str = FFI::MemoryPointer.from_string(string)
    @refs << str
    str
end