Sha256: 3f1489a3cb1dd2bf4648dc1bda7e3f1a760bcc80ec22866cf5e02c4b93bd8a3d

Contents?: true

Size: 733 Bytes

Versions: 8

Compression:

Stored size: 733 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'command_lion'
require 'pry'

CommandLion::App.run do
  name "Hello There!"
  version "1.0.0"
  description "A more complex 'hello' application!"
  
  command :hello do
    flag "hello"
    type :strings
    default "world"
    description "Say hello to something! ( default: #{default} )"
    
    action do
      options[:count].argument.times do
        puts "Hello #{argument}!"
      end
    end
    
    option :count do
      description "Change how many times you say hello."
      flag "count"
      type :integer
      default 1
      action do
        abort "Must be a positive integer greater than 1" unless argument >= 1 
      end
    end
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
command_lion-2.0.1 examples/hello_expanded.rb
command_lion-2.0.0 examples/hello_expanded.rb
command_lion-1.0.4 examples/hello_expanded.rb
command_lion-1.0.3geff examples/hello_expanded.rb
command_lion-1.0.3 examples/hello_expanded.rb
command_lion-1.0.2 examples/hello_expanded.rb
command_lion-1.0.1 examples/hello_expanded.rb
command_lion-1.0.0 examples/hello_expanded.rb