module Loofah::ScrubBehavior

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/loofah/concerns.rbs

module Loofah::ScrubBehavior
  def resolve_scrubber: (Rails::HTML::PermitScrubber scrubber) -> Rails::HTML::PermitScrubber
end

def resolve_scrubber(scrubber) # :nodoc:

Experimental RBS support (using type sampling data from the type_fusion project).

def resolve_scrubber: (Rails::HTML::PermitScrubber scrubber) -> Rails::HTML::PermitScrubber

This signature was generated using 5 samples from 1 application.

:nodoc:
def resolve_scrubber(scrubber) # :nodoc:
  scrubber = Scrubbers::MAP[scrubber].new if Scrubbers::MAP[scrubber]
  unless scrubber.is_a?(Loofah::Scrubber)
    raise Loofah::ScrubberNotFound, "not a Scrubber or a scrubber name: #{scrubber.inspect}"
  end
  scrubber
end