Created
July 29, 2021 04:40
-
-
Save wamaeb/41093c283245e9a87c042e6a26c94a39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CustomService | |
def log(level, message) | |
puts "We are logging #{level} #{message}" | |
end | |
end | |
class AnotherService | |
include CustomService | |
def do_something | |
begin | |
# do something | |
rescue StandardError => e | |
log :error, e.message | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment