class Listen::Silencer
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/listen/silencer.rbs class Listen::Silencer def _ignore?: (String path) -> bool def configure: (Hash options) -> untyped def initialize: (**Hash options) -> void def silenced?: (String relative_path, Symbol type) -> nil end
def _ignore?(path)
Experimental RBS support (using type sampling data from the type_fusion
project).
def _ignore?: (String path) -> bool
This signature was generated using 129 samples from 1 application.
def _ignore?(path) ignore_patterns.any? { |pattern| path =~ pattern } end
def _init_ignores(ignores, overrides)
def _init_ignores(ignores, overrides) patterns = [] unless overrides patterns << DEFAULT_IGNORED_FILES patterns << DEFAULT_IGNORED_EXTENSIONS end patterns << ignores patterns << overrides patterns.compact.flatten end
def _only?(path)
def _only?(path) only_patterns.any? { |pattern| path =~ pattern } end
def configure(options)
Experimental RBS support (using type sampling data from the type_fusion
project).
def configure: ( options) -> untyped
This signature was generated using 1 sample from 1 application.
def configure(options) @only_patterns = options[:only] ? Array(options[:only]) : nil @ignore_patterns = _init_ignores(options[:ignore], options[:ignore!]) end
def initialize(**options)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (** options) -> void
This signature was generated using 2 samples from 1 application.
def initialize(**options) configure(options) end
def silenced?(relative_path, type)
Experimental RBS support (using type sampling data from the type_fusion
project).
def silenced?: (String relative_path, Symbol type) -> nil
This signature was generated using 124 samples from 1 application.
def silenced?(relative_path, type) path = relative_path.to_s # in case it is a Pathname _ignore?(path) || (only_patterns && type == :file && !_only?(path)) end