lib/hatetepe/body.rb in hatetepe-0.6.0.pre.1 vs lib/hatetepe/body.rb in hatetepe-0.6.0.pre.2
- old
+ new
@@ -13,10 +13,11 @@
body.closed.fulfill
body
end
end
+ # TODO: eliminate string param
def initialize(string = '')
@io = StringIO.new(string)
closed.on_progress { |str| @io.write(str) }
end
@@ -44,9 +45,13 @@
closed.sync
end
def to_s
closed.sync
+ @io.string
+ end
+
+ def string
@io.string
end
private