Sha256: 4abc01ea2253fd48416b0b83d45ef13d5b0608a14c6f35d6fa0614b5690aff21
Contents?: true
Size: 556 Bytes
Versions: 12
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true module RailsBestPractices module Core class Gems < Array def has_gem?(gem_name) find { |gem| gem.name == gem_name } end def gem_version(gem_name) find { |gem| gem.name == gem_name }.try(:version) end end # Gem info includes gem name and gem version class Gem attr_reader :name, :version def initialize(name, version) @name = name @version = version end def to_s "#{@name} (#{@version})" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems