Method: #gem_version_str

Defined in:
lib/kowl/helpers.rb

#gem_version_str(gem) ⇒ String

If the gem requires a specific version, determine it

Parameters:

  • gem (String)
    • To determine if the specified gems requires a specific version to run with the application

Returns:

  • (String)
    • If the gem require a specific version, it will return that version entry for the gemfile



46
47
48
49
50
51
# File 'lib/kowl/helpers.rb', line 46

def gem_version_str(gem)
  return '' unless gem.version

  # "#{gem.version ? ", '#{gem.version}'" : ''}"
  ", '#{gem.version}'"
end