类 IRB::Statement::Command

公共类方法

new(code, command, arg, command_class) 点击切换源代码
# File lib/irb/statement.rb, line 47
def initialize(code, command, arg, command_class)
  @code = code
  @command = command
  @arg = arg
  @command_class = command_class
end

公共实例方法

evaluable_code() 点击切换源代码
# File lib/irb/statement.rb, line 68
def evaluable_code
  # Hook command-specific transformation to return valid Ruby code
  if @command_class.respond_to?(:transform_args)
    arg = @command_class.transform_args(@arg)
  else
    arg = @arg
  end

  [@command, arg].compact.join(' ')
end
is_assignment?() 点击切换源代码
# File lib/irb/statement.rb, line 54
def is_assignment?
  false
end
should_be_handled_by_debugger?() 点击切换源代码
# File lib/irb/statement.rb, line 62
def should_be_handled_by_debugger?
  require_relative 'cmd/help'
  require_relative 'cmd/debug'
  IRB::ExtendCommand::DebugCommand > @command_class || IRB::ExtendCommand::Help == @command_class
end
suppresses_echo?() 点击切换源代码
# File lib/irb/statement.rb, line 58
def suppresses_echo?
  false
end