Class: StringBuilder::Buffer
- Inherits:
-
Array
- Object
- Array
- StringBuilder::Buffer
- Defined in:
- lib/string_builder.rb
Instance Method Summary collapse
-
#<<(value) ⇒ Object
Allows us to pass StringBuilder objects into the buffer and have them show up as arrays.
Instance Method Details
#<<(value) ⇒ Object
Allows us to pass StringBuilder objects into the buffer and have them show up as arrays. Once they’re in the buffer we don’t want nested buffers anyway.
13 14 15 16 |
# File 'lib/string_builder.rb', line 13 def <<(value) value = value.to_a unless value.is_a?(Symbol) super end |