Class: Serialbench::CLI
- Inherits:
-
Serialbench::Cli::BaseCli
- Object
- Serialbench::Cli::BaseCli
- Serialbench::CLI
- Defined in:
- lib/serialbench/cli.rb
Overview
Main CLI entry point for the new object-oriented command structure
Class Method Summary collapse
Instance Method Summary collapse
- #help(command = nil) ⇒ Object
-
#method_missing(method_name, *_args) ⇒ Object
Handle unknown commands gracefully.
- #respond_to_missing?(_method_name, _include_private = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *_args) ⇒ Object
Handle unknown commands gracefully
68 69 70 71 72 73 |
# File 'lib/serialbench/cli.rb', line 68 def method_missing(method_name, *_args) puts "Unknown command: #{method_name}" puts '' help exit 1 end |
Class Method Details
.version ⇒ Object
26 27 28 |
# File 'lib/serialbench/cli.rb', line 26 def self.version puts "Serialbench version #{Serialbench::VERSION}" end |
Instance Method Details
#help(command = nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/serialbench/cli.rb', line 31 def help(command = nil) if command super(command) else puts <<~HELP Serialbench - Benchmarking Framework for Ruby Serialization Libraries USAGE: serialbench COMMAND [SUBCOMMAND] [OPTIONS] COMMANDS: environment Manage benchmark environments (Docker, ASDF, Local) benchmark Manage individual benchmark runs ruby-build Manage Ruby-Build definitions for validation version Show version information help Show this help message EXAMPLES: # Create a Docker environment serialbench environment new docker-test docker # Run multi-environment benchmarks serialbench environment multi-execute asdf --config=serialbench-asdf.yml serialbench environment multi-execute docker --config=serialbench-docker.yml # Create and execute a benchmark serialbench benchmark create my-benchmark serialbench benchmark execute my-benchmark.yml For detailed help on any command, use: serialbench COMMAND help HELP end end |
#respond_to_missing?(_method_name, _include_private = false) ⇒ Boolean
75 76 77 |
# File 'lib/serialbench/cli.rb', line 75 def respond_to_missing?(_method_name, _include_private = false) false end |