shipyard-framework 0.5.62 → 0.5.63
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shipyard-framework/helpers/icon_helper.rb +10 -2
- data/lib/shipyard-framework/version.rb +1 -1
- data/styleguide/Gemfile.lock +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77da96d81489555d590d00ec526ae635643dc71e89f82ca8df62a89ec721e8cd
|
4
|
+
data.tar.gz: c28e1672fe9d9ae8ea65b58e9d801341998a5d91848f1bf9780d9055f5ed5625
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f62e4ed3172c20c23408eca7562ef302bb15dd69c712688e400b81bdcabbc2bd0e1e13fd85762b0aad93793e21ef2ab51ffa117b588d331e3e922cae2ada997
|
7
|
+
data.tar.gz: de621c35d2f5dad50aaf9b1b27fcfc5dfa1c6e224b346ffdf77dc9fe3b6847026ed7673ced9df9fe03992590afc4c3497402fc2aac18dc8f857e153fd5631d22
|
@@ -4,6 +4,16 @@ module Shipyard
|
|
4
4
|
include ActionView::Helpers::TagHelper
|
5
5
|
|
6
6
|
def icon(name, options={})
|
7
|
+
process_icon(name, options)
|
8
|
+
end
|
9
|
+
|
10
|
+
def get_icon(name, options={})
|
11
|
+
process_icon(name, options)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def process_icon(name, options={})
|
7
17
|
if name.is_a? Symbol
|
8
18
|
svg = find_icon(symbol: name)
|
9
19
|
svg_use_tag svg, options
|
@@ -13,8 +23,6 @@ module Shipyard
|
|
13
23
|
end
|
14
24
|
end
|
15
25
|
|
16
|
-
private
|
17
|
-
|
18
26
|
def find_icon(hash)
|
19
27
|
icon = $icons.icons.detect { |i| i[hash.keys.first] == hash.values.first }
|
20
28
|
raise_error(hash.values.first) unless icon
|
data/styleguide/Gemfile.lock
CHANGED