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.
104 105 106 107 108 |
# File 'lib/uberspec.rb', line 104 def initialize(io) super('') @captured = '' @old_io = io end |
Instance Attribute Details
#captured ⇒ Object (readonly)
Returns the value of attribute captured.
102 103 104 |
# File 'lib/uberspec.rb', line 102 def captured @captured end |
#old_io ⇒ Object (readonly)
Returns the value of attribute old_io.
101 102 103 |
# File 'lib/uberspec.rb', line 101 def old_io @old_io end |
Instance Method Details
#write(string) ⇒ Object
110 111 112 113 |
# File 'lib/uberspec.rb', line 110 def write(string) @captured = string super end |