Exception: SaferRedis::Danger
- Defined in:
- lib/safer_redis/danger.rb
Instance Method Summary collapse
-
#initialize(doc) ⇒ Danger
constructor
A new instance of Danger.
Constructor Details
#initialize(doc) ⇒ Danger
Returns a new instance of Danger.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/safer_redis/danger.rb', line 5 def initialize(doc) = <<~MESSAGE The #{doc.name} Redis command might be dangerous. #{doc.url} ACL categories: #{doc.acl_categories.join(" ")} Complexity: #{doc.complexity} If you're sure this is okay, you can try again within `SaferRedis.really { ... }` MESSAGE if doc.suggestion = <<~MESSAGE #{} Suggestion: #{doc.suggestion.description} MESSAGE end super() end |