Class: Dapp::Helper::Streaming::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/dapp/helper/streaming.rb

Overview

Stream

Instance Method Summary collapse

Instance Method Details

#<<(string) ⇒ Object



11
12
13
# File 'lib/dapp/helper/streaming.rb', line 11

def <<(string)
  buffer << string
end

#bufferObject



7
8
9
# File 'lib/dapp/helper/streaming.rb', line 7

def buffer
  @buffer ||= []
end

#showObject



15
16
17
# File 'lib/dapp/helper/streaming.rb', line 15

def show
  buffer.join.strip
end