Created
December 23, 2014 14:54
-
-
Save paneq/d23dfba89ac72b6ddf9f to your computer and use it in GitHub Desktop.
dead code concern ;)
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
class DeadCodeConcern | |
def self.dead_code_or_not_dead_code?(name) | |
notify_honeybadger_not_dead_code(name) | |
notify_logger_not_dead_code(name) | |
end | |
def self.notify_honeybadger_not_dead_code(name) | |
Honeybadger.notify( StandardError.new("Not dead code: #{name}") ) | |
end | |
def self.notify_logger_not_dead_code(name) | |
Rails.logger.warn("Not dead code: #{name}") | |
Rails.logger.warn(caller.join("\n")) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment