Class: FontAwesome5Rails::Parsers::FaStackedIconParser
- Inherits:
-
Object
- Object
- FontAwesome5Rails::Parsers::FaStackedIconParser
- Includes:
- ParseMethods
- Defined in:
- lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#reverse ⇒ Object
readonly
Returns the value of attribute reverse.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #first_icon_classes ⇒ Object
-
#initialize(icon, options) ⇒ FaStackedIconParser
constructor
A new instance of FaStackedIconParser.
- #more_options(key) ⇒ Object
- #second_icon_classes ⇒ Object
- #span_classes ⇒ Object
Methods included from ParseMethods
#arr_with_fa, #icon_type, #icon_type_path, #prepend_fa
Constructor Details
#initialize(icon, options) ⇒ FaStackedIconParser
Returns a new instance of FaStackedIconParser.
10 11 12 13 14 15 16 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 10 def initialize(icon, ) @icon = icon @text = [:text] @reverse = [:reverse] == true @title = [:title] = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 8 def end |
#reverse ⇒ Object (readonly)
Returns the value of attribute reverse.
8 9 10 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 8 def reverse @reverse end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
8 9 10 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 8 def text @text end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 8 def title @title end |
Instance Method Details
#first_icon_classes ⇒ Object
22 23 24 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 22 def first_icon_classes @first_icon_classes ||= parse_icon_classes([:base], true) end |
#more_options(key) ⇒ Object
30 31 32 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 30 def (key) [key] ? [key].except(:class, :text) : {} end |
#second_icon_classes ⇒ Object
26 27 28 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 26 def second_icon_classes @second_icon_classes ||= parse_icon_classes(@icon, false) end |
#span_classes ⇒ Object
18 19 20 |
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 18 def span_classes @span_classes ||= parse_span_classes end |