Class: DohLog::StreamAcceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/dohlog/stream_acceptor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ios) ⇒ StreamAcceptor

Returns a new instance of StreamAcceptor.



6
7
8
# File 'lib/dohlog/stream_acceptor.rb', line 6

def initialize(ios)
  @ios = ios
end

Instance Attribute Details

#iosObject (readonly)

Returns the value of attribute ios.



4
5
6
# File 'lib/dohlog/stream_acceptor.rb', line 4

def ios
  @ios
end

Instance Method Details

#add(event) ⇒ Object



10
11
12
# File 'lib/dohlog/stream_acceptor.rb', line 10

def add(event)
  @ios.puts("#{event.summary}\n#{event.exception_text}")
end

#shutdownObject



14
15
16
# File 'lib/dohlog/stream_acceptor.rb', line 14

def shutdown
  @ios = nil
end