Class: NotifyMe::Log::Base
- Inherits:
-
Object
- Object
- NotifyMe::Log::Base
- Defined in:
- lib/notifyme/log.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Base
constructor
A new instance of Base.
- #logger ⇒ Object
Constructor Details
#initialize(args) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/notifyme/log.rb', line 7 def initialize(args) @logger = args.first.to_s.downcase @parameters = args.last end |
Class Method Details
.default ⇒ Object
21 22 23 24 |
# File 'lib/notifyme/log.rb', line 21 def self.default require 'notifyme/log/stdout.rb' NotifyMe::Log::Stdout.new end |
Instance Method Details
#logger ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/notifyme/log.rb', line 12 def logger begin require "notifyme/log/#{@logger}.rb" rescue Exception => e raise "The #{@logger} is invalid." end NotifyMe::Log.const_get(@logger.capitalize).new @parameters end |