Class: Pakyow::Logger::Destination

Inherits:
Object
  • Object
show all
Defined in:
lib/pakyow/logger/destination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, io) ⇒ Destination

Returns a new instance of Destination.



8
9
10
# File 'lib/pakyow/logger/destination.rb', line 8

def initialize(name, io)
  @name, @io = name, io
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



6
7
8
# File 'lib/pakyow/logger/destination.rb', line 6

def io
  @io
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/pakyow/logger/destination.rb', line 6

def name
  @name
end

Instance Method Details

#call(entry) ⇒ Object



12
13
14
# File 'lib/pakyow/logger/destination.rb', line 12

def call(entry)
  @io.write(entry)
end