Class: LoggerStub
- Inherits:
-
Object
- Object
- LoggerStub
- Defined in:
- lib/cart/logger_stub.rb
Overview
LoggerStub.new lambda { |message| puts message } LoggerStub.new(method(:puts))
Instance Method Summary collapse
- #debug(message) ⇒ Object
-
#initialize(callable) ⇒ LoggerStub
constructor
A new instance of LoggerStub.
Constructor Details
#initialize(callable) ⇒ LoggerStub
Returns a new instance of LoggerStub.
10 11 12 |
# File 'lib/cart/logger_stub.rb', line 10 def initialize(callable) @callable = callable end |
Instance Method Details
#debug(message) ⇒ Object
14 15 16 |
# File 'lib/cart/logger_stub.rb', line 14 def debug() @callable.call() end |