Class: PassiveQueue::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/passive_queue/cli.rb

Overview

Command-line interface for PassiveQueue meditation and zen commands

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.start(args) ⇒ void

This method returns an undefined value.

Entry point for the CLI application

Parameters:

  • args (Array<String>)

    command-line arguments



11
12
13
# File 'lib/passive_queue/cli.rb', line 11

def self.start(args)
  new.run(args)
end

Instance Method Details

#run(args) ⇒ void

This method returns an undefined value.

Runs the CLI with provided arguments

Parameters:

  • args (Array<String>)

    command-line arguments to process



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/passive_queue/cli.rb', line 19

def run(args)
  # Parse arguments manually (no Thor dependency)
  options = parse_args(args)

  case args.first
  when "passive", nil
    passive_command(options)
  when "help", "-h", "--help"
    show_help
  else
    puts "Unknown command: #{args.first}"
    show_help
    exit(1)
  end
end