Sha256: 603d111797d47920cbdf87d1661ea08df63efb71c15cae7b3952a1ebf2aa7403
Contents?: true
Size: 522 Bytes
Versions: 34
Compression:
Stored size: 522 Bytes
Contents
require 'fasterer/rescue_call' require 'fasterer/offense' require 'fasterer/scanners/offensive' module Fasterer class RescueCallScanner include Fasterer::Offensive attr_reader :element def initialize(element) @element = element check_offense end private def check_offense if rescue_call.rescue_classes.include? :NoMethodError add_offense(:rescue_vs_respond_to) end end def rescue_call @rescue_call ||= RescueCall.new(element) end end end
Version data entries
34 entries across 34 versions & 1 rubygems