class Wxp::Command

Public Class Methods

new(argv) click to toggle source

initialize 方法是一个标准的 Ruby 类方法,是类的构造函数

Calls superclass method
# File lib/wxp/command.rb, line 39
def initialize(argv) 
    super
    
    unless self.ansi_output?
      Colored2.disable!
      String.send(:define_method, :colorize) { |string, _| string }
    end
end
options() click to toggle source
Calls superclass method
# File lib/wxp/command.rb, line 27
def self.options
    [
      ['--silent', 'Show nothing'],
    ].concat(super)
end
run(argv) click to toggle source

类方法使用 def self.methodname() 定义

Calls superclass method
# File lib/wxp/command.rb, line 34
def self.run(argv)
    super(argv)
end