Class: OklahomaMixer::ExtensibleString

Inherits:
Object
  • Object
show all
Defined in:
lib/oklahoma_mixer/extensible_string.rb,
lib/oklahoma_mixer/extensible_string/c.rb

Overview

:nodoc:

Defined Under Namespace

Modules: C

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeExtensibleString


5
6
7
# File 'lib/oklahoma_mixer/extensible_string.rb', line 5

def initialize
  @pointer = C.new
end

Instance Attribute Details

#pointerObject (readonly)

Returns the value of attribute pointer


9
10
11
# File 'lib/oklahoma_mixer/extensible_string.rb', line 9

def pointer
  @pointer
end

Instance Method Details

#freeObject


15
16
17
# File 'lib/oklahoma_mixer/extensible_string.rb', line 15

def free
  C.del(@pointer)
end

#to_sObject


11
12
13
# File 'lib/oklahoma_mixer/extensible_string.rb', line 11

def to_s
  data_pointer.get_bytes(0, data_size)
end