Module: LogShusher
Overview
Requests will be logged if the following block evaluates to nil or false:
LogShusher.shush do |env|
# ...
end
Instance Attribute Summary collapse
-
#shush_condition ⇒ Object
Returns the value of attribute shush_condition.
Instance Method Summary collapse
Instance Attribute Details
#shush_condition ⇒ Object
Returns the value of attribute shush_condition.
9 10 11 |
# File 'lib/log_shusher.rb', line 9 def shush_condition @shush_condition end |
Instance Method Details
#shush(&block) ⇒ Object
11 12 13 14 15 |
# File 'lib/log_shusher.rb', line 11 def shush(&block) self.shush_condition = block shush_rails shush_rack end |
#shush?(env) ⇒ Boolean
17 18 19 |
# File 'lib/log_shusher.rb', line 17 def shush?(env) self.shush_condition.call env end |