Skip to content

Instantly share code, notes, and snippets.

@ksol
Created October 14, 2015 20:29
Show Gist options
  • Select an option

  • Save ksol/25958899d28bf8e5f839 to your computer and use it in GitHub Desktop.

Select an option

Save ksol/25958899d28bf8e5f839 to your computer and use it in GitHub Desktop.
Thor example
class MyCLI < Thor
desc "hello NAME", "say hello to NAME"
option :from
def hello(name)
puts "from: #{options[:from]}" if options[:from]
puts "Hello #{name}"
end
end
@mkeithm1
Copy link

mkeithm1 commented Dec 8, 2017

class MyCLI < Thor
desc "hello NAME", "say hello to NAME"
option :from
def hello(name)
puts "from: #{options[:from]}" if options[:from]
puts "Hello #{name}"
end
end

@mkeithm1
Copy link

mkeithm1 commented Dec 8, 2017

class MyCLI < Thor
desc "hello NAME", "say hello to NAME"
option :from
def hello(name)
puts "from: #{options[:from]}" if options[:from]
puts "Hello #Mike
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment