Sha256: 595b78bb7afbc110c3b05d2c50c322ec45d05c92d3300edeccbe87638f452abb
Contents?: true
Size: 569 Bytes
Versions: 2
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true require "pry" require "json" require_relative "ruby/version" module Iconify module Ruby class Error < StandardError; end extend self def dir() File.expand_path("../../iconify-json", __dir__) end def collections() data = File.read(File.join(dir, "collections.json")) JSON.parse(data) end def locate(name) begin data = File.read(File.join(dir, "json/#{name}.json")) JSON.parse(data) rescue => exception { error: exception } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
iconify-ruby-0.2.0 | lib/iconify/ruby.rb |
iconify-ruby-0.1.0 | lib/iconify/ruby.rb |