Class: Cline::OutStreams::WithNotify
- Inherits:
-
Object
- Object
- Cline::OutStreams::WithNotify
- Defined in:
- lib/cline/out_streams.rb
Instance Attribute Summary collapse
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Instance Method Summary collapse
-
#initialize(stream = $stdout) ⇒ WithNotify
constructor
A new instance of WithNotify.
- #puts(str) ⇒ Object
Constructor Details
#initialize(stream = $stdout) ⇒ WithNotify
Returns a new instance of WithNotify.
18 19 20 |
# File 'lib/cline/out_streams.rb', line 18 def initialize(stream = $stdout) @stream = stream end |
Instance Attribute Details
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
16 17 18 |
# File 'lib/cline/out_streams.rb', line 16 def stream @stream end |
Instance Method Details
#puts(str) ⇒ Object
22 23 24 25 |
# File 'lib/cline/out_streams.rb', line 22 def puts(str) puts_stream str Notify.notify '', str end |