Method: AwesomeExplain::Insights::MongoidInsights.analyze
- Defined in:
- lib/awesome_explain/insights/mongoid_insights.rb
.analyze(metrics = [], &block) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/awesome_explain/insights/mongoid_insights.rb', line 5 def self.analyze(metrics = [], &block) instance = new instance.init instance.metrics = metrics block_result = instance.instance_eval(&block) instance.tear_down block_result unless metrics.size.positive? end |