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



52
53
54
# File 'lib/libcouchbase/connection.rb', line 52

def cmd
  @cmd
end

#deferObject

Returns the value of attribute defer

Returns:

  • (Object)

    the current value of defer



52
53
54
# File 'lib/libcouchbase/connection.rb', line 52

def defer
  @defer
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



52
53
54
# File 'lib/libcouchbase/connection.rb', line 52

def key
  @key
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



52
53
54
# File 'lib/libcouchbase/connection.rb', line 52

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



54
55
56
57
58
59
# File 'lib/libcouchbase/connection.rb', line 54

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