Method: Warnings.from

Defined in:
lib/warnings/warnings.rb

.from(path) ⇒ Warning

Selects all warnings originating from a file.

Parameters:

  • path (String)

    The sub-path to search for.

Returns:

  • (Warning)

    The warnings from the sub-path.



45
46
47
# File 'lib/warnings/warnings.rb', line 45

def self.from(path)
  $WARNINGS.select { |warning| warning.source_file.include?(path) }
end