Sha256: f809e1d2abecfbadf307cf52d9a4ecebb6d4d00a0e2dd78349478f619aa49c50

Contents?: true

Size: 339 Bytes

Versions: 163

Compression:

Stored size: 339 Bytes

Contents

require "octicons_v2"
require "action_view"

module OcticonsV2Helper

  include ActionView::Helpers::TagHelper

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

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

Version data entries

163 entries across 163 versions & 1 rubygems

Version Path
octicons_v2_helper-0.0.0.pre.09b41f4 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.b805754 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.ff9cdef lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.65153c6 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.4a9c363 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.8b56653 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.4f5d35b lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.5a7686c lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.9ce0354 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.94d0d86 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.37939a1 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.e54379b lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.a423abb lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.2820449 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.256cc72 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.0b7823d lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.4d4873a lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.b9c3ca0 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.32e6052 lib/octicons_v2_helper/helper.rb
octicons_v2_helper-0.0.0.pre.1bf52fd lib/octicons_v2_helper/helper.rb