Module: OcticonsHelper

Includes:
ActionView::Helpers::TagHelper
Defined in:
lib/octicons_helper/helper.rb,
lib/octicons_helper/railtie.rb,
lib/octicons_helper/version.rb

Defined Under Namespace

Classes: Railtie

Constant Summary collapse

VERSION =
"9.5.0".freeze

Instance Method Summary collapse

Instance Method Details

#octicon(symbol, options = {}) ⇒ Object



8
9
10
11
12
13
# File 'lib/octicons_helper/helper.rb', line 8

def octicon(symbol, options = {})
  return "" if symbol.nil?

  icon = Octicons::Octicon.new(symbol, options)
  (:svg, icon.path.html_safe, icon.options) # rubocop:disable Rails/OutputSafety
end