Module: LunaPark::Tools
- Defined in:
- lib/luna_park.rb,
lib/luna_park/tools.rb
Class Method Summary collapse
- .if_gem_installed(name, *requirements) ⇒ Object (also: gem_installed?)
Class Method Details
.if_gem_installed(name, *requirements) ⇒ Object Also known as: gem_installed?
7 8 9 10 11 12 13 14 |
# File 'lib/luna_park/tools.rb', line 7 def if_gem_installed(name, *requirements) Gem::Specification.find_by_name name, *requirements rescue Gem::MissingSpecError false else yield if block_given? true end |