Class: FoxTail::IconSets::FlowbiteIconSet

Inherits:
Base
  • Object
show all
Defined in:
lib/fox_tail/icon_sets/flowbite_icon_set.rb

Constant Summary collapse

ROOT_DIR =
"app/assets/vendor/flowbite-icons"
VARIANTS =
%i[solid outline].freeze

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from FoxTail::IconSets::Base

Instance Method Details

#path(icon, variant: :solid) ⇒ Object



9
10
11
12
13
14
# File 'lib/fox_tail/icon_sets/flowbite_icon_set.rb', line 9

def path(icon, variant: :solid)
  __raise_invalid_variant(variant) unless VARIANTS.include?(variant.to_sym)

  file_name = "#{normalize_icon_name(icon)}.svg"
  root_path.join variant.to_s, file_name
end

#root_pathObject



16
17
18
# File 'lib/fox_tail/icon_sets/flowbite_icon_set.rb', line 16

def root_path
  FoxTail.root.join(ROOT_DIR)
end