Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/scrubyt/utils/ruby_extensions.rb
Overview
just some hack here to allow current examples’ syntax: table_data.to_xml.write(open(‘result.xml’, ‘w’), 1)
Instance Method Summary collapse
Instance Method Details
#write(stringio, add_indent = 0) ⇒ Object
65 66 67 |
# File 'lib/scrubyt/utils/ruby_extensions.rb', line 65 def write(stringio, add_indent=0) stringio.write((self.split("\n").collect { |line| (' ' * add_indent) + line }).join("\n")) end |