Class: Amfetamine::Logger
- Inherits:
-
Object
- Object
- Amfetamine::Logger
- Includes:
- Singleton
- Defined in:
- lib/amfetamine/logger.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/amfetamine/logger.rb', line 7 def method_missing(method, args) args = "[Amfetamine] #{args.to_s}" if defined?(Rails) Rails.logger.send(method,args) # Yeah, temporarilly :-)) elsif defined?(Merb) Merb.logger.send(method,args) else puts args end end |