Class: Utils::Gem
Class Method Summary collapse
Class Method Details
.exists?(name) ⇒ Boolean
9 10 11 12 13 14 |
# File 'lib/utils/gem.rb', line 9 def self.exists?(name) gemfile_content = File.read('Gemfile') pattern = /gem\s+['"]#{name}['"]/ !gemfile_content.scan(pattern).empty? end |
.gemfile_exist? ⇒ Boolean
17 18 19 |
# File 'lib/utils/gem.rb', line 17 def self.gemfile_exist? File.exist?('Gemfile') end |