Class: DeadEndUnloaded::MiniStringIO
- Inherits:
-
Object
- Object
- DeadEndUnloaded::MiniStringIO
- Defined in:
- lib/dead_end/core_ext.rb
Instance Attribute Summary collapse
-
#isatty ⇒ Object
readonly
Returns the value of attribute isatty.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(isatty: $stderr.isatty) ⇒ MiniStringIO
constructor
A new instance of MiniStringIO.
- #puts(value = $/) ⇒ Object
Constructor Details
#initialize(isatty: $stderr.isatty) ⇒ MiniStringIO
Returns a new instance of MiniStringIO.
10 11 12 13 |
# File 'lib/dead_end/core_ext.rb', line 10 def initialize(isatty: $stderr.isatty) @string = +"" @isatty = isatty end |
Instance Attribute Details
#isatty ⇒ Object (readonly)
Returns the value of attribute isatty.
15 16 17 |
# File 'lib/dead_end/core_ext.rb', line 15 def isatty @isatty end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
20 21 22 |
# File 'lib/dead_end/core_ext.rb', line 20 def string @string end |
Instance Method Details
#puts(value = $/) ⇒ Object
16 17 18 |
# File 'lib/dead_end/core_ext.rb', line 16 def puts(value = $/, **) @string << value end |