class Rouge::CLI::Help
def self.desc
def self.desc "print help info" end
def self.doc
def self.doc return enum_for(:doc) unless block_given? yield %|usage: rougify help <command>| yield %|| yield %|print help info for <command>.| end
def self.parse(argv)
def self.parse(argv) opts = { :mode => CLI } until argv.empty? arg = argv.shift klass = class_from_arg(arg) if klass opts[:mode] = klass next end end new(opts) end
def initialize(opts={})
def initialize(opts={}) @mode = opts[:mode] end
def run
def run @mode.doc.each(&method(:puts)) end