Class: Cline::OutStreams::WithNotify

Inherits:
Object
  • Object
show all
Defined in:
lib/cline/out_streams.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#streamObject (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