Class: StringBuf
- Inherits:
-
Object
- Object
- StringBuf
- Defined in:
- lib/lib/string_buf.rb
Instance Attribute Summary collapse
-
#b ⇒ Object
protected - in ruby this doesn’t play well with static/inline methods.
-
#length ⇒ Object
Returns the value of attribute length.
Instance Method Summary collapse
-
#initialize ⇒ StringBuf
constructor
A new instance of StringBuf.
Constructor Details
#initialize ⇒ StringBuf
Returns a new instance of StringBuf.
6 7 8 |
# File 'lib/lib/string_buf.rb', line 6 def initialize @b = "" end |
Instance Attribute Details
#b ⇒ Object
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 |
#length ⇒ Object
Returns the value of attribute length.
16 17 18 |
# File 'lib/lib/string_buf.rb', line 16 def length @length end |