Skip to content

Instantly share code, notes, and snippets.

@wamaeb
Created July 29, 2021 04:40
Show Gist options
  • Save wamaeb/41093c283245e9a87c042e6a26c94a39 to your computer and use it in GitHub Desktop.
Save wamaeb/41093c283245e9a87c042e6a26c94a39 to your computer and use it in GitHub Desktop.
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