Class: GithubHook::MessageLogger
- Inherits:
-
Object
- Object
- GithubHook::MessageLogger
- Defined in:
- app/services/github_hook/message_logger.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#wrapped_logger ⇒ Object
readonly
Returns the value of attribute wrapped_logger.
Instance Method Summary collapse
- #debug(message = yield)) ⇒ Object
- #error(message = yield)) ⇒ Object
- #fatal(message = yield)) ⇒ Object
- #info(message = yield)) ⇒ Object
-
#initialize(wrapped_logger = nil) ⇒ MessageLogger
constructor
A new instance of MessageLogger.
- #warn(message = yield)) ⇒ Object
Constructor Details
#initialize(wrapped_logger = nil) ⇒ MessageLogger
Returns a new instance of MessageLogger.
5 6 7 8 |
# File 'app/services/github_hook/message_logger.rb', line 5 def initialize(wrapped_logger = nil) @messages = [] @wrapped_logger = wrapped_logger end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
3 4 5 |
# File 'app/services/github_hook/message_logger.rb', line 3 def @messages end |
#wrapped_logger ⇒ Object (readonly)
Returns the value of attribute wrapped_logger.
3 4 5 |
# File 'app/services/github_hook/message_logger.rb', line 3 def wrapped_logger @wrapped_logger end |
Instance Method Details
#debug(message = yield)) ⇒ Object
10 11 12 |
# File 'app/services/github_hook/message_logger.rb', line 10 def debug( = yield) (:debug, ) end |
#error(message = yield)) ⇒ Object
14 15 16 |
# File 'app/services/github_hook/message_logger.rb', line 14 def error( = yield) (:error, ) end |
#fatal(message = yield)) ⇒ Object
18 19 20 |
# File 'app/services/github_hook/message_logger.rb', line 18 def fatal( = yield) (:fatal, ) end |
#info(message = yield)) ⇒ Object
22 23 24 |
# File 'app/services/github_hook/message_logger.rb', line 22 def info( = yield) (:info, ) end |
#warn(message = yield)) ⇒ Object
26 27 28 |
# File 'app/services/github_hook/message_logger.rb', line 26 def warn( = yield) (:warn, ) end |