Sha256: 3695c17d8ab7a46b1d05bc64b13573daee077a0b731b07ae6cee16c45d62b497

Contents?: true

Size: 467 Bytes

Versions: 5

Compression:

Stored size: 467 Bytes

Contents

#!/usr/bin/env ruby
require "bundler/setup"
require "hanami/cli"

module Foo
  module CLI
    module Commands
      extend Hanami::CLI::Registry

      class Greet < Hanami::CLI::Command
        argument :name, required: true, desc: "The name of the person to greet"

        def call(name:, **)
          result = "Hello #{name}"

          puts result
        end
      end

      register "hello", Greet
    end
  end
end

Hanami::CLI.new(Foo::CLI::Commands).call

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
my_help-0.6.1 docs/yagi/comparisons/hanami.rb
my_help-0.6.0 docs/yagi/comparisons/hanami.rb
my_help-0.5.2 docs/yagi/comparisons/hanami.rb
my_help-0.5.1 docs/yagi/comparisons/hanami.rb
my_help-0.5.0 docs/yagi/comparisons/hanami.rb