Class: FaStackedIconParser

Inherits:
Object
  • Object
show all
Includes:
ParseMethods
Defined in:
lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ParseMethods

#arr_with_fa, #icon_type, #prepend_fa

Constructor Details

#initialize(icon, options) ⇒ FaStackedIconParser

Returns a new instance of FaStackedIconParser.



8
9
10
11
12
13
14
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 8

def initialize(icon, options)
  @icon = icon
  @text = options[:text]
  @reverse = options[:reverse] == true
  @title = options[:title]
  @options = options
end

Instance Attribute Details

#first_icon_classesObject (readonly)

Returns the value of attribute first_icon_classes.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def first_icon_classes
  @first_icon_classes
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def options
  @options
end

#reverseObject (readonly)

Returns the value of attribute reverse.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def reverse
  @reverse
end

#second_icon_classesObject (readonly)

Returns the value of attribute second_icon_classes.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def second_icon_classes
  @second_icon_classes
end

#span_classesObject (readonly)

Returns the value of attribute span_classes.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def span_classes
  @span_classes
end

#textObject (readonly)

Returns the value of attribute text.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def text
  @text
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 6

def title
  @title
end

Instance Method Details

#more_options(key) ⇒ Object



28
29
30
# File 'lib/font_awesome5_rails/parsers/fa_stacked_icon_parser.rb', line 28

def more_options(key)
  options[key] ? options[key].except(:class, :text) : {}
end