Class: MyIO
- Inherits:
-
IO
- Object
- IO
- MyIO
- Defined in:
- lib/uberspec.rb
Instance Attribute Summary collapse
-
#captured ⇒ Object
readonly
Returns the value of attribute captured.
-
#old_io ⇒ Object
readonly
Returns the value of attribute old_io.
Instance Method Summary collapse
-
#initialize(io) ⇒ MyIO
constructor
A new instance of MyIO.
- #write(string) ⇒ Object
Constructor Details
#initialize(io) ⇒ MyIO
Returns a new instance of MyIO.
108 109 110 111 112 |
# File 'lib/uberspec.rb', line 108 def initialize(io) super('') @captured = '' @old_io = io end |
Instance Attribute Details
#captured ⇒ Object (readonly)
Returns the value of attribute captured.
106 107 108 |
# File 'lib/uberspec.rb', line 106 def captured @captured end |
#old_io ⇒ Object (readonly)
Returns the value of attribute old_io.
105 106 107 |
# File 'lib/uberspec.rb', line 105 def old_io @old_io end |
Instance Method Details
#write(string) ⇒ Object
114 115 116 117 |
# File 'lib/uberspec.rb', line 114 def write(string) @captured = string super end |