Sha256: 1cfc7c51d8f4f07855fbb41e18bc4860b656ba153a36bfe2ac818f4faa253a1b

Contents?: true

Size: 552 Bytes

Versions: 1

Compression:

Stored size: 552 Bytes

Contents

class DevSystem::NotFoundCommand < DevSystem::Command

  def self.call args
    # 1. LOG

    log :higher, "Called #{self}.#{__method__} with args #{args}"
    puts

    # 2. FIND commands

    App.eager_load_all
    commands = Liza::Command.descendants

    log "Liza comes with #{commands.count} commands you can use."
    puts

    log "Here they are:"
    puts

    # 3. LIST commands

    keys = commands.map { |k| k.last_namespace.snakecase[0..-9] }.sort
    keys.reject! { |s| s == "not_found" }
    keys.each { |s| log "liza #{s}" }
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lizarb-1.0.3 lib/dev_system/dev/controllers/command/not_found_command.rb