font_awesome_list 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7d34d6e1e13928faf476dda4aadb68eeeaf4f09dada0ab561cb9ea4f5e400a6
4
- data.tar.gz: c094c32d749efb5bf1b826fddcd9ef30e1c28fd1409fc0b3d03d4f7092260d23
3
+ metadata.gz: 9a27ff4d7731c21f55f676a6d93105ea2c8ec9679099039883b6e7a80aa7b3ce
4
+ data.tar.gz: 3b8ae15e1de1f10bea2f75715facc35c4ef561f6905ff16c7c45d781446f3b12
5
5
  SHA512:
6
- metadata.gz: 2f88cdd7ca2429ba6f89517512201d96fe4c7ba9a61b82e412566cce1de6cb17dc52d0d7e70572056936d41fcf06f118f79b9da2861264a054b0460f56cc5ce2
7
- data.tar.gz: 661b60dfd354934d1d7b1899701c29b3d3f65f3b674f3642e863dcc97f4b9d414f592c2f8b8df7df9c7df76d520c7de76aa6aa64ec0cd2d47c4bd6c1061114ca
6
+ metadata.gz: 8f3fa3689a8d1389ae9699bc8e8ae337cbd569e82b0b0c1dc88dce22678867715c671222461e520a1010a7cb75bc9313f50b76f664fce829b554d095b79e19ec
7
+ data.tar.gz: 6e1c6b6982f672b3b5edb7e36d2da64151671102187d10f8082e30b1ec9007a200e480d0b27dbeb89ffb046730c9367ad922aae50330f1fedb607317fcd2bb99
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- font_awesome_list (0.1.0)
4
+ font_awesome_list (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -20,10 +20,16 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- Access the list of icons (without the `fa` prefix):
23
+ Access the list of the icon names (without the `fa` prefix):
24
24
 
25
25
  ```ruby
26
- FontAwesomeList::Icon.all
26
+ FontAwesomeList::Icon.all #=> returns hash with {name: "...", styles: ["brands", "solid"]}
27
+ ```
28
+
29
+ Access the list of the icon names (without the `fa` prefix):
30
+
31
+ ```ruby
32
+ FontAwesomeList::Icon.names #=> returns array of names
27
33
  ```
28
34
 
29
35
  ## Development
@@ -2,11 +2,16 @@ require "yaml"
2
2
 
3
3
  module FontAwesomeList
4
4
  class Icon
5
- ICON_FILE = "#{__dir__}/icons.yml".freeze
6
-
7
5
  def self.all
8
- icons = File.read(ICON_FILE)
9
- YAML.load(icons).keys
6
+ icons.map { |k,v| { name: k, styles: v["styles"].map(&:to_sym) } }
7
+ end
8
+
9
+ def self.icons
10
+ YAML.load File.read("#{__dir__}/icons.yml")
11
+ end
12
+
13
+ def self.names
14
+ icons.keys
10
15
  end
11
16
  end
12
17
  end
@@ -1,3 +1,3 @@
1
1
  module FontAwesomeList
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: font_awesome_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Charnes