Class: Icons::Icon::FilePath

Inherits:
Object
  • Object
show all
Defined in:
lib/icons/icon/file_path.rb

Instance Method Summary collapse

Constructor Details

#initialize(name:, library:, variant:) ⇒ FilePath

Returns a new instance of FilePath.



8
9
10
11
12
# File 'lib/icons/icon/file_path.rb', line 8

def initialize(name:, library:, variant:)
  @name = name
  @library = library.to_sym
  @variant = variant&.to_sym
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/icons/icon/file_path.rb', line 14

def call
  if animated_library?
    path = animated_icons_path
    raise Icons::IconNotFound if path.nil?
    return path
  end

  return custom_library_path if custom_library?

  app_path
end