Sha256: ccdc5050bd192cc26ed65740e4c20663c87b20a42c7a3e76d427cc16d22386f2
Contents?: true
Size: 605 Bytes
Versions: 22
Compression:
Stored size: 605 Bytes
Contents
require 'reek/smells/smell_detector' require 'reek/smell_warning' module Reek module Smells # # A Nested Iterator occurs when a block contains another block. # # +NestedIterators+ reports failing methods only once. # class NestedIterators < SmellDetector def self.contexts # :nodoc: [:iter] end # # Checks whether the given +block+ is inside another. # Remembers any smells found. # def examine_context(block) return false unless block.nested_block? found(block, 'is nested') end end end end
Version data entries
22 entries across 22 versions & 2 rubygems