Module: ParseMethods
- Included in:
- FaIconParser, FaLayeredIconParser, FaStackedIconParser
- Defined in:
- lib/font_awesome5_rails/parsers/parse_methods.rb
Instance Method Summary collapse
Instance Method Details
#arr_with_fa(array) ⇒ Object
21 22 23 24 |
# File 'lib/font_awesome5_rails/parsers/parse_methods.rb', line 21 def arr_with_fa(array) array = handle_input(array) array.split(" ").map{ |s| prepend_fa(s) } end |
#icon_type(type) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/font_awesome5_rails/parsers/parse_methods.rb', line 3 def icon_type(type) return "fas" if type.nil? case type.to_s when "far", "regular" "far" when "fal", "light" "fal" when "fab", "brand" "fab" else "fas" end end |
#prepend_fa(string) ⇒ Object
17 18 19 |
# File 'lib/font_awesome5_rails/parsers/parse_methods.rb', line 17 def prepend_fa(string) "fa-#{string}" end |