From bf95613c7b24d60517bae346739206c5f28f1e1c Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 4 Jan 2024 07:21:17 -0800 Subject: [PATCH] Output a usage string of `NUM` for Integer params. --- lib/ronin/core/cli/printing/params.rb | 2 +- spec/cli/printing/params_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ronin/core/cli/printing/params.rb b/lib/ronin/core/cli/printing/params.rb index 00c92de..48231ed 100644 --- a/lib/ronin/core/cli/printing/params.rb +++ b/lib/ronin/core/cli/printing/params.rb @@ -83,7 +83,7 @@ def print_params(klass) def param_usage(param) case param.type when Core::Params::Types::Boolean then 'BOOL' - when Core::Params::Types::Integer then 'INT' + when Core::Params::Types::Integer then 'NUM' when Core::Params::Types::Float then 'FLOAT' when Core::Params::Types::Regexp then '/REGEX/' when Core::Params::Types::URI then 'URL' diff --git a/spec/cli/printing/params_spec.rb b/spec/cli/printing/params_spec.rb index a251762..c44fd0e 100644 --- a/spec/cli/printing/params_spec.rb +++ b/spec/cli/printing/params_spec.rb @@ -79,8 +79,8 @@ class TestCommand < Ronin::Core::CLI::Command context "when given a param with an Integer type" do let(:type) { Ronin::Core::Params::Types::Integer.new } - it "must return 'INT'" do - expect(subject.param_usage(param)).to eq('INT') + it "must return 'NUM'" do + expect(subject.param_usage(param)).to eq('NUM') end end