Class: Amalgalite::Taps::StringIO
Overview
This class provides an IO tap that writes to a StringIO. The result is available via .to_s or .string.
Instance Attribute Summary
Attributes inherited from IO
#io, #profile_tap, #trace_count
Instance Method Summary collapse
-
#initialize ⇒ StringIO
constructor
A new instance of StringIO.
- #to_s ⇒ Object (also: #string)
Methods inherited from IO
#dump_profile, #output_profile_event, #profile, #samplers, #trace
Constructor Details
#initialize ⇒ StringIO
Returns a new instance of StringIO.
62 63 64 65 |
# File 'lib/amalgalite/taps/io.rb', line 62 def initialize @stringio = ::StringIO.new super( @stringio ) end |
Instance Method Details
#to_s ⇒ Object Also known as: string
67 68 69 |
# File 'lib/amalgalite/taps/io.rb', line 67 def to_s @stringio.string end |