Class: FA::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/fa/base.rb

Overview

FontAwesome 5 (Pro) Helper core class for inheritance

Since:

  • 0.1.0

Direct Known Subclasses

Icon, Layer, Link, Span

Instance Method Summary collapse

Instance Method Details

#rawObject

Outputs the formatted string directly.

Since:

  • 0.1.0



7
8
9
# File 'lib/fa/base.rb', line 7

def raw
  #
end

#safeObject

Attempts to call ‘.html_safe` on the the output of `raw`, if available.

Since:

  • 0.1.0



12
13
14
15
# File 'lib/fa/base.rb', line 12

def safe
  output = raw
  output.respond_to?(:html_safe) ? output.html_safe : output
end