Class: Pakyow::Logger::Destination
- Inherits:
-
Object
- Object
- Pakyow::Logger::Destination
- Defined in:
- lib/pakyow/logger/destination.rb
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(entry) ⇒ Object
-
#initialize(name, io) ⇒ Destination
constructor
A new instance of Destination.
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
#io ⇒ Object (readonly)
Returns the value of attribute io.
6 7 8 |
# File 'lib/pakyow/logger/destination.rb', line 6 def io @io end |
#name ⇒ Object (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 |