Class: Concrete::Util::StringWriter
- Inherits:
-
Object
- Object
- Concrete::Util::StringWriter
- Defined in:
- lib/concrete/util/string_writer.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize ⇒ StringWriter
constructor
A new instance of StringWriter.
- #write(s) ⇒ Object
Constructor Details
#initialize ⇒ StringWriter
Returns a new instance of StringWriter.
7 8 9 |
# File 'lib/concrete/util/string_writer.rb', line 7 def initialize @string = "" end |
Instance Attribute Details
#string ⇒ Object (readonly)
Returns the value of attribute string.
6 7 8 |
# File 'lib/concrete/util/string_writer.rb', line 6 def string @string end |
Instance Method Details
#write(s) ⇒ Object
10 11 12 |
# File 'lib/concrete/util/string_writer.rb', line 10 def write(s) @string << s end |