class AssetFinder::PathPattern

Attributes

pattern[R]

Public Class Methods

new(pattern:) click to toggle source
# File lib/asset_finder/path_pattern.rb, line 5
def initialize(pattern:)
  @pattern = pattern

  freeze
end

Public Instance Methods

match(path:) click to toggle source
# File lib/asset_finder/path_pattern.rb, line 15
def match(path:)
  path.match(pattern)
end
match?(path:) click to toggle source
# File lib/asset_finder/path_pattern.rb, line 11
def match?(path:)
  path.match?(pattern)
end