Sha256: 850371ac01618bbb800a0539e074995d5b4f3113b0fd164471d3e530398f831b
Contents?: true
Size: 447 Bytes
Versions: 14
Compression:
Stored size: 447 Bytes
Contents
# Helper class for handling user-provided burgees. # # @private class USPSFlags::Burgees::Customs def self.available Dir.glob("#{USPSFlags.configuration.burgees_dir}/**/*.svg").map do |b| b.split("/").last.split(".svg").first.to_sym end end def self.get(burgee) raise USPSFlags::Errors::UnknownBurgee unless self.available.include?(burgee) ::File.read("#{USPSFlags.configuration.burgees_dir}/#{burgee}.svg") end end
Version data entries
14 entries across 14 versions & 1 rubygems