class TaskJuggler::XMLBlob

This is a specialized XMLElement to represent XML blobs. The content is not interpreted and must be valid XML in the content it is added.

Public Class Methods

new(blob = '') click to toggle source
Calls superclass method TaskJuggler::XMLElement::new
# File lib/taskjuggler/XMLElement.rb, line 227
def initialize(blob = '')
  super(nil, {})
  raise ArgumentError, "blob may not be nil" if blob.nil?
  @blob = blob
end

Public Instance Methods

to_s(indent) click to toggle source
# File lib/taskjuggler/XMLElement.rb, line 233
def to_s(indent)
  out = ''
  @blob.each_utf8_char do |c|
    out += (c == "\n" ? "\n" + ' ' * indent : c)
  end
  out
end