Sha256: 07f266855d50254eb03440b6614acc23efc70ef16b6a8ce790848997c1ef1ab6

Contents?: true

Size: 567 Bytes

Versions: 4

Compression:

Stored size: 567 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Spoom
  module Deadcode
    module Plugins
      class Thor < Base
        extend T::Sig

        ignore_methods_named("exit_on_failure?")

        sig { override.params(indexer: Indexer, definition: Definition).void }
        def on_define_method(indexer, definition)
          return if indexer.nesting_block # method defined in `no_commands do ... end`, we don't want to ignore it

          definition.ignored! if indexer.nesting_class_superclass_name =~ /^(::)?Thor$/
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spoom-1.3.2 lib/spoom/deadcode/plugins/thor.rb
spoom-1.3.1 lib/spoom/deadcode/plugins/thor.rb
spoom-1.3.0 lib/spoom/deadcode/plugins/thor.rb
spoom-1.2.4 lib/spoom/deadcode/plugins/thor.rb