Parent

Class/Module Index [+]

Quicksearch

Tidybuf

Buffer structure.

Constants

TidyBuffer

Mimic TidyBuffer.

Attributes

struct[R]

Access TidyBuffer instance.

Public Class Methods

new() click to toggle source
# File lib/tidy/tidybuf.rb, line 20
def initialize
  @struct = TidyBuffer.malloc
end

Public Instance Methods

free() click to toggle source

Free current contents and zero out.

# File lib/tidy/tidybuf.rb, line 26
def free
  Tidylib.buf_free(@struct)
end
to_a() click to toggle source

Convert to array.

# File lib/tidy/tidybuf.rb, line 32
def to_a
  to_s.split("\r\n")
end
to_s() click to toggle source

Convert to string.

# File lib/tidy/tidybuf.rb, line 38
def to_s
  @struct.bp ? @struct.bp.to_s(@struct.size) : ''
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.