Class: StringBuf

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/string_buf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStringBuf

Returns a new instance of StringBuf.



6
7
8
# File 'lib/lib/string_buf.rb', line 6

def initialize
  @b = ""
end

Instance Attribute Details

#bObject

protected - in ruby this doesn’t play well with static/inline methods



12
13
14
# File 'lib/lib/string_buf.rb', line 12

def b
  @b
end

#lengthObject

Returns the value of attribute length.



16
17
18
# File 'lib/lib/string_buf.rb', line 16

def length
  @length
end