Sha256: 50d712dd62975da833b6142058092232a9f5fbb20d4ca4cd83a16b0b6c64e74f

Contents?: true

Size: 628 Bytes

Versions: 5

Compression:

Stored size: 628 Bytes

Contents

# typed: strict
# frozen_string_literal: true

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

        ignore_classes_inheriting_from("ActionMailer::Preview")

        sig { override.params(definition: Model::Method).void }
        def on_define_method(definition)
          owner = definition.owner
          return unless owner.is_a?(Model::Class)

          superclass_name = owner.superclass_name
          return unless superclass_name

          @index.ignore(definition) if superclass_name == "ActionMailer::Preview"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spoom-1.5.0 lib/spoom/deadcode/plugins/action_mailer_preview.rb
spoom-1.4.2 lib/spoom/deadcode/plugins/action_mailer_preview.rb
spoom-1.4.1 lib/spoom/deadcode/plugins/action_mailer_preview.rb
spoom-1.4.0 lib/spoom/deadcode/plugins/action_mailer_preview.rb
spoom-1.3.3 lib/spoom/deadcode/plugins/action_mailer_preview.rb