Class: Log4r::Outputter
- Inherits:
-
Object
- Object
- Log4r::Outputter
- Defined in:
- lib/easy_log4r/outputter.rb
Overview
Extension of base Log4r::Outputter class to add @default as an attribute
and a class-level method to retrieve all outputters that have that attribute
set.
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
Class Method Summary collapse
-
.default_outputters ⇒ Object
Gathers all outputters that have @default set.
Instance Method Summary collapse
-
#default? ⇒ Boolean
Returns whether or not @default has been set.
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
7 8 9 |
# File 'lib/easy_log4r/outputter.rb', line 7 def default @default end |
Class Method Details
.default_outputters ⇒ Object
Gathers all outputters that have @default set
11 12 13 14 15 16 17 18 |
# File 'lib/easy_log4r/outputter.rb', line 11 def self.default_outputters defaults = [] each_outputter do |outputter| defaults << outputter if outputter.default? end return defaults end |
Instance Method Details
#default? ⇒ Boolean
Returns whether or not @default has been set
22 23 24 |
# File 'lib/easy_log4r/outputter.rb', line 22 def default? !!@default end |