Created
October 14, 2015 20:29
-
-
Save ksol/25958899d28bf8e5f839 to your computer and use it in GitHub Desktop.
Thor example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
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
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