Class: IOWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/outputs/kusto.rb

Overview

wrapper class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ IOWriter

Returns a new instance of IOWriter.



400
401
402
# File 'lib/logstash/outputs/kusto.rb', line 400

def initialize(io)
  @io = io
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



413
414
415
416
417
418
419
420
# File 'lib/logstash/outputs/kusto.rb', line 413

def method_missing(method_name, *args, &block)
  if @io.respond_to?(method_name)

    @io.send(method_name, *args, &block)
  else
    super
  end
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



421
422
423
# File 'lib/logstash/outputs/kusto.rb', line 421

def active
  @active
end

Instance Method Details

#flushObject



409
410
411
# File 'lib/logstash/outputs/kusto.rb', line 409

def flush
  @io.flush
end

#write(*args) ⇒ Object



404
405
406
407
# File 'lib/logstash/outputs/kusto.rb', line 404

def write(*args)
  @io.write(*args)
  @active = true
end