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
23 24 25 26 |
# File 'lib/font_awesome5_rails/parsers/parse_methods.rb', line 23 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 16 17 |
# File 'lib/font_awesome5_rails/parsers/parse_methods.rb', line 3 def icon_type(type) return "fas" if type.nil? case type.to_sym when :far, :regular "far" when :fal, :light "fal" when :fab, :brand "fab" when :fad, :duotone "fad" else "fas" end end |
#prepend_fa(string) ⇒ Object
19 20 21 |
# File 'lib/font_awesome5_rails/parsers/parse_methods.rb', line 19 def prepend_fa(string) "fa-#{string}" end |