Skip to content

Instantly share code, notes, and snippets.

View khalidjaz's full-sized avatar

khalid khalidjaz

View GitHub Profile
@yatinsns
yatinsns / Thor_example.rb
Last active May 13, 2021 16:49
Ruby : Thor used to add commands / subcommands as arguments.
require 'thor'
class MyCLI < Thor
# class options that apply across all commands for a class.
class_option :verbose, :type => :boolean
desc "hello NAME", "say hello to NAME"
def hello(name)
puts "Hello #{name}"
end