Module: Sinlog::Proc
- Defined in:
- lib/sinlog/07_proc.rb
Overview
Each function is implemented using Kernel.lambda(&:log_xxx)
Provides a set of reusable unary lambdas.
Class Method Summary collapse
-
.dbg ⇒ ::Proc
Returns a lambda that calls
log_dbgon the given object. -
.err ⇒ ::Proc
Returns a lambda that calls
log_erron the given object. -
.fatal ⇒ ::Proc
Returns a lambda that calls
log_fatalon the given object. -
.info ⇒ ::Proc
Returns a lambda that calls
log_infoon the given object. -
.unk ⇒ ::Proc
Returns a lambda that calls
log_unkon the given object. -
.warn ⇒ ::Proc
Returns a lambda that calls
log_warnon the given object.
Class Method Details
.dbg ⇒ ::Proc
Returns a lambda that calls log_dbg on the given object.
35 36 37 |
# File 'lib/sinlog/07_proc.rb', line 35 def dbg Kernel.lambda(&:log_dbg) end |
.err ⇒ ::Proc
Returns a lambda that calls log_err on the given object.
68 69 70 |
# File 'lib/sinlog/07_proc.rb', line 68 def err Kernel.lambda(&:log_err) end |
.fatal ⇒ ::Proc
Returns a lambda that calls log_fatal on the given object.
79 80 81 |
# File 'lib/sinlog/07_proc.rb', line 79 def fatal Kernel.lambda(&:log_fatal) end |
.info ⇒ ::Proc
Returns a lambda that calls log_info on the given object.
46 47 48 |
# File 'lib/sinlog/07_proc.rb', line 46 def info Kernel.lambda(&:log_info) end |
.unk ⇒ ::Proc
Returns a lambda that calls log_unk on the given object.
90 91 92 |
# File 'lib/sinlog/07_proc.rb', line 90 def unk Kernel.lambda(&:log_unk) end |
.warn ⇒ ::Proc
Returns a lambda that calls log_warn on the given object.
57 58 59 |
# File 'lib/sinlog/07_proc.rb', line 57 def warn Kernel.lambda(&:log_warn) end |