Module: Gorails::Commands

Defined in:
lib/gorails/commands.rb,
lib/gorails/commands/help.rb,
lib/gorails/commands/jobs.rb,
lib/gorails/commands/example.rb,
lib/gorails/commands/version.rb,
lib/gorails/commands/episodes.rb,
lib/gorails/commands/jumpstart.rb,
lib/gorails/commands/railsbytes.rb

Defined Under Namespace

Classes: Episodes, Example, Help, Jobs, Jumpstart, Railsbytes, Version

Constant Summary collapse

Registry =
CLI::Kit::CommandRegistry.new(default: "help")

Class Method Summary collapse

Class Method Details

.register(const, cmd, path) ⇒ Object



7
8
9
10
# File 'lib/gorails/commands.rb', line 7

def self.register(const, cmd, path)
  autoload(const, path)
  Registry.add(-> { const_get(const) }, cmd)
end