Top Level Namespace

Defined Under Namespace

Modules: Avo, Generators, Rails

Constant Summary collapse

STYLES =
%w[outline filled].freeze

Instance Method Summary collapse

Instance Method Details

#icons_rootObject



21
22
23
24
25
26
27
28
29
# File 'lib/avo/skills/avo-menu-icons/scripts/list_icons.rb', line 21

def icons_root
  spec = Gem::Specification.find_all_by_name("avo-icons").max_by(&:version)
  abort "avo-icons gem not found. It is a dependency of avo — run `bundle install`." if spec.nil?

  root = File.join(spec.gem_dir, "lib", "assets", "svgs", "tabler")
  abort "avo-icons #{spec.version} has no tabler icons at #{root}" unless Dir.exist?(root)

  root
end

#names_for(root, style) ⇒ Object



31
32
33
# File 'lib/avo/skills/avo-menu-icons/scripts/list_icons.rb', line 31

def names_for(root, style)
  Dir.glob(File.join(root, style, "*.svg")).map { |p| File.basename(p, ".svg") }.sort
end

#🥑Object



224
225
226
# File 'lib/avo.rb', line 224

def 🥑
  Avo
end