Class: Gena::Plugin
- Inherits:
-
Thor
- Object
- Thor
- Gena::Plugin
- Defined in:
- lib/plugin/plugin.rb
Class Method Summary collapse
Class Method Details
.descendants ⇒ Object
22 23 24 |
# File 'lib/plugin/plugin.rb', line 22 def self.descendants ObjectSpace.each_object(Class).select { |klass| klass < self } end |
.setup_thor_commands ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/plugin/plugin.rb', line 12 def self.setup_thor_commands app_klass = Gena::Application app_klass.commands.merge!(self.commands) self.commands.each do |key, value| hash = app_klass.class_for_command hash[key] = self app_klass.class_for_command = hash end end |