Class: RailsIcons::Icon::FilePath
- Inherits:
-
Object
- Object
- RailsIcons::Icon::FilePath
- Defined in:
- lib/rails_icons/icon/file_path.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name:, library:, variant:) ⇒ FilePath
constructor
A new instance of FilePath.
Constructor Details
#initialize(name:, library:, variant:) ⇒ FilePath
Returns a new instance of FilePath.
4 5 6 7 8 |
# File 'lib/rails_icons/icon/file_path.rb', line 4 def initialize(name:, library:, variant:) @name = name @library = library @variant = variant end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails_icons/icon/file_path.rb', line 10 def call return animated_icons_path if @library.animated? return custom_library_path if @library.custom? icon_path = icons_path_in_app || icons_path_in_engines raise RailsIcons::IconNotFound if icon_path.nil? icon_path end |