Module: Bailiff::Ruby

Included in:
Context
Defined in:
lib/bailiff/ruby.rb

Instance Method Summary collapse

Instance Method Details

#gem(*gems) ⇒ Object



9
10
11
# File 'lib/bailiff/ruby.rb', line 9

def gem(*gems)
  run "gem install #{gems.join(" ")}"
end

#has_gem(gem, version = nil) ⇒ Object



4
5
6
7
# File 'lib/bailiff/ruby.rb', line 4

def has_gem(gem, version = nil)
  version = version ? "--version '#{version}'" : ''
  @commands << "gem list '#{gem}' --installed #{version} > /dev/null"
end