File: command.thor

package info (click to toggle)
ruby-thor 0.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 792 kB
  • ctags: 564
  • sloc: ruby: 7,315; makefile: 2; sh: 1
file content (10 lines) | stat: -rw-r--r-- 249 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
# module: random

class Amazing < Thor
  desc "describe NAME", "say that someone is amazing"
  method_options :forcefully => :boolean
  def describe(name, opts)
    ret = "#{name} is amazing"
    puts opts["forcefully"] ? ret.upcase : ret
  end
end