Class: LogStashLogger::Device::Connectable
- Inherits:
-
Base
- Object
- Base
- LogStashLogger::Device::Connectable
show all
- Defined in:
- lib/logstash-logger/device/connectable.rb
Instance Attribute Summary
Attributes inherited from Base
#io, #sync
Instance Method Summary
collapse
Methods inherited from Base
#close, #initialize
Instance Method Details
#connected? ⇒ Boolean
23
24
25
|
# File 'lib/logstash-logger/device/connectable.rb', line 23
def connected?
!!@io
end
|
#flush ⇒ Object
10
11
12
13
14
15
|
# File 'lib/logstash-logger/device/connectable.rb', line 10
def flush
return unless connected?
with_connection do
super
end
end
|
#to_io ⇒ Object
17
18
19
20
21
|
# File 'lib/logstash-logger/device/connectable.rb', line 17
def to_io
with_connection do
@io
end
end
|
#write(message) ⇒ Object
4
5
6
7
8
|
# File 'lib/logstash-logger/device/connectable.rb', line 4
def write(message)
with_connection do
super
end
end
|