Module: Toys::StandardMixins::Gems::ClassMethods
- Defined in:
- lib/toys/standard_mixins/gems.rb
Overview
This module extends the tool class when you include the Gems mixin,
so that the gems and gem directives defined in this module are
available.
Instance Method Summary collapse
-
#gem(name, *requirements, **options) ⇒ :activated, ...
Activate the given gem.
-
#gems ⇒ Toys::Utils::Gems
Returns a tool-wide instance of Utils::Gems.
Instance Method Details
#gem(name, *requirements, **options) ⇒ :activated, ...
Activate the given gem. If it is not present, attempt to install it (or inform the user to update the bundle).
116 117 118 119 |
# File 'lib/toys/standard_mixins/gems.rb', line 116 def gem(name, *requirements, **) gems_util = .empty? ? gems : Utils::Gems.new(**) gems_util.activate(name, *requirements) end |
#gems ⇒ Toys::Utils::Gems
Returns a tool-wide instance of Utils::Gems.
97 98 99 |
# File 'lib/toys/standard_mixins/gems.rb', line 97 def gems @__default_gems_util end |