lib/protos/icon/inhouse.rb in protos-icon-0.3.1 vs lib/protos/icon/inhouse.rb in protos-icon-0.4.0

- old
+ new

@@ -1,22 +1,13 @@ # frozen_string_literal: true module Protos module Icon module Inhouse - def self.build(name, ...) - filepath = lookup(name) - Component.new(filepath) - end - - def self.lookup(name, ...) - assets = Pathname.new(GEM_ROOT).join("assets/inhouse") - - assets - .join("#{name}.svg") - .tap do |path| - File.exist?(path) or raise MissingIcon, "Unknown icon: #{name}" - end - end + # autogenerated:start + autoload :Facebook, "protos/icon/inhouse/facebook.rb" + autoload :Twitter, "protos/icon/inhouse/twitter.rb" + autoload :Youtube, "protos/icon/inhouse/youtube.rb" + # autogenerated:finish end end end