Module: EverydayPlugins::Loader
- Defined in:
- lib/everyday-plugins/plugin.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.depend(*deps, &block) ⇒ Object
98 99 100 101 102 103 104 |
# File 'lib/everyday-plugins/plugin.rb', line 98 def self.depend(*deps, &block) met = deps.all? { |dep| matches = Gem::Specification.find_all_by_name(*dep) !(matches.nil? || matches.empty?) } block.call if met end |
Instance Method Details
#depend(*deps, &block) ⇒ Object
94 95 96 |
# File 'lib/everyday-plugins/plugin.rb', line 94 def depend(*deps, &block) EverydayPlugins::Loader.depend(*deps, &block) end |