Class: FA::Link
Overview
FontAwesome 5 (Pro) Helper for generating CDN links
Instance Method Summary collapse
-
#initialize(version:, integrity:, pro: true) ⇒ Link
constructor
Outputs the CDN link.
-
#raw ⇒ Object
Outputs the formatted link directly.
Methods inherited from Base
Constructor Details
#initialize(version:, integrity:, pro: true) ⇒ Link
Outputs the CDN link.
7 8 9 10 11 |
# File 'lib/fa/link.rb', line 7 def initialize(version:, integrity:, pro: true) @version = version @integrity = integrity @subdomain = pro ? 'pro' : 'use' end |
Instance Method Details
#raw ⇒ Object
Outputs the formatted link directly.
14 15 16 17 |
# File 'lib/fa/link.rb', line 14 def raw "<link rel=\"stylesheet\" href=\"#{url}\" " \ "integrity=\"#{@integrity}\" crossorigin=\"anonymous\">" end |