Skip to content

Commit

Permalink
chore: memonize #report method
Browse files Browse the repository at this point in the history
Memonie #report method for performance improvement
  • Loading branch information
ninoseki committed Apr 25, 2019
1 parent 82c4f75 commit b16f37a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/rogue_one/detector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ def initialize(target:)
end

def report
inspect
@report ||= [].tap do |out|
inspect

{
verdict: verdict,
landing_pages: landing_pages
}
out << { verdict: verdict, landing_pages: landing_pages }
end.first
end

private
Expand Down

0 comments on commit b16f37a

Please sign in to comment.