module Hanami::Octicons::Helper

Create a helper method for GitHub's octiocons

Private Instance Methods

octicon(symbol, options = {}) click to toggle source
# File lib/hanami/octicons/helper.rb, line 12
def octicon(symbol, options = {})
  return "" unless symbol

  svg = ::Octicons::Octicon.new(symbol, options).to_svg
  Utils::Escape::SafeString.new(svg)
end