Sha256: 12f431b866ad363903858ddbe75c787a00e998fa28728194818afd64a870a9af

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

module FontAwesomeVersionHelper
  # Determines if the App uses Font Awesome releases 3.x or 4.x
  # @return [TrueClass, FalseClass]
  def font_awesome_four?
    Bundler.environment.specs['font-awesome-rails'].first.version >= Gem::Version.new('4')
  end

  # Selects one of two HTML element classes depending upon the release of Font Awesome used by the App
  # @param if3 [String] the Font Awesome 3 HTML class
  # @param if4 [String] the Font Awesome 4 HTML class
  # @return [String] the Font Awesome HTML class
  def fa3or4(if3, if4)
    font_awesome_four? ? if4 : if3
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
browse-everything-1.0.0.rc1 app/helpers/font_awesome_version_helper.rb
browse-everything-0.16.1 app/helpers/font_awesome_version_helper.rb