Skip to content

Instantly share code, notes, and snippets.

@paneq
Created December 23, 2014 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paneq/d23dfba89ac72b6ddf9f to your computer and use it in GitHub Desktop.
Save paneq/d23dfba89ac72b6ddf9f to your computer and use it in GitHub Desktop.
dead code concern ;)
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