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.



382
383
384
# File 'lib/logstash/outputs/kusto.rb', line 382

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



395
396
397
398
399
400
401
402
# File 'lib/logstash/outputs/kusto.rb', line 395

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.



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

def active
  @active
end

Instance Method Details

#flushObject



391
392
393
# File 'lib/logstash/outputs/kusto.rb', line 391

def flush
  @io.flush
end

#write(*args) ⇒ Object



386
387
388
389
# File 'lib/logstash/outputs/kusto.rb', line 386

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