class Golem::Command::Base
Abstract class for commands. @abstract Subclass and override {#run} to implement a custom Command
class.
Public Class Methods
new(opts)
click to toggle source
@param [Hash] opts options @option opts [Boolean] :verbose control verbosity.
# File lib/golem/command.rb, line 58 def initialize(opts) @opts = opts end
Public Instance Methods
command(cmd, *args)
click to toggle source
Run another command. @param [Symbol] cmd the command to run, @param *args arguments for the command.
# File lib/golem/command.rb, line 75 def command(cmd, *args) Golem::Command.run(cmd, @opts, *args) end
run()
click to toggle source
Run the command.
# File lib/golem/command.rb, line 68 def run abort "Bad command." end
verbose?()
click to toggle source
Check verbosity.
# File lib/golem/command.rb, line 63 def verbose? !!@opts[:verbose] end