Class: Sputnik::CLI::Setup
- Inherits:
-
Object
- Object
- Sputnik::CLI::Setup
- Defined in:
- lib/sputnik/cli/setup.rb
Instance Method Summary collapse
Instance Method Details
#call(*args) ⇒ Object
4 5 6 7 8 |
# File 'lib/sputnik/cli/setup.rb', line 4 def call(*args) logical_paths(Gem.find_files('sputnik/plugin/**/*.rb')).each do |path| Kernel.require path end end |
#logical_paths(absolute_paths) ⇒ Object
10 11 12 13 14 |
# File 'lib/sputnik/cli/setup.rb', line 10 def logical_paths(absolute_paths) absolute_paths.map do |absolute| "sputnik/plugin#{absolute.split('sputnik/plugin').last}".gsub('.rb','') end end |