Sha256: 207ebd7efe7623e05476d6b559758a54bfd9aa180b9aa8a02d59854ddf0c3a14
Contents?: true
Size: 553 Bytes
Versions: 18
Compression:
Stored size: 553 Bytes
Contents
# encoding: utf-8 module RailsBestPractices module Core class Gems < Array def has_gem?(gem_name) self.find { |gem| gem.name == gem_name } end def gem_version(gem_name) self.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
18 entries across 18 versions & 1 rubygems