Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
xymbol committed Nov 11, 2023
1 parent 1e0e821 commit 630f99d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/inline_svg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def asset_finder=(asset_finder)
end

def asset_finder
@asset_finder ||= matching_asset_finder
@asset_finder ||= detect_asset_finder
end

def svg_not_found_css_class=(css_class)
Expand All @@ -85,17 +85,17 @@ def raise_on_file_not_found?

private

def incompatible_transformation?(klass)
!klass.is_a?(Class) || !klass.respond_to?(:create_with_value) || !klass.instance_methods.include?(:transform)
end

def matching_asset_finder
def detect_asset_finder
ASSET_FINDERS.find do |klass|
asset_finder = klass.new
break asset_finder if asset_finder.match?
rescue NameError
end
end

def incompatible_transformation?(klass)
!klass.is_a?(Class) || !klass.respond_to?(:create_with_value) || !klass.instance_methods.include?(:transform)
end
end

@configuration = InlineSvg::Configuration.new
Expand Down

0 comments on commit 630f99d

Please sign in to comment.