Skip to content

Instantly share code, notes, and snippets.

@ihollander
Last active October 23, 2018 02:18
Show Gist options
  • Save ihollander/3c725d793af43efaf0a526307fe935bf to your computer and use it in GitHub Desktop.
Save ihollander/3c725d793af43efaf0a526307fe935bf to your computer and use it in GitHub Desktop.
Thor step 5
class HeroCLI < Thor
...
desc "assemble TEAM", "Displays a TEAM of superheroes."
option :size, :type => :numeric, :required => true, :desc => "How many superheroes to assemble"
def assemble(team)
puts "***#{team} Assemble***"
options[:size].times do
puts "#{Faker::Superhero.name} #{Faker::Superhero.suffix}!"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment