Class: IRB::Statement::Command

Inherits:
IRB::Statement show all
Defined in:
lib/irb/statement.rb

Instance Attribute Summary collapse

Attributes inherited from IRB::Statement

#code

Instance Method Summary collapse

Constructor Details

#initialize(original_code, command_class, arg) ⇒ Command

Returns a new instance of Command.

[View source]

81
82
83
84
85
# File 'lib/irb/statement.rb', line 81

def initialize(original_code, command_class, arg)
  @code = original_code
  @command_class = command_class
  @arg = arg
end

Instance Attribute Details

#argObject (readonly)

Returns the value of attribute arg.


79
80
81
# File 'lib/irb/statement.rb', line 79

def arg
  @arg
end

#command_classObject (readonly)

Returns the value of attribute command_class.


79
80
81
# File 'lib/irb/statement.rb', line 79

def command_class
  @command_class
end

Instance Method Details

#is_assignment?Boolean

Returns:

  • (Boolean)
[View source]

87
88
89
# File 'lib/irb/statement.rb', line 87

def is_assignment?
  false
end

#should_be_handled_by_debugger?Boolean

Returns:

  • (Boolean)
[View source]

95
96
97
98
# File 'lib/irb/statement.rb', line 95

def should_be_handled_by_debugger?
  require_relative 'command/debug'
  IRB::Command::DebugCommand > @command_class
end

#suppresses_echo?Boolean

Returns:

  • (Boolean)
[View source]

91
92
93
# File 'lib/irb/statement.rb', line 91

def suppresses_echo?
  true
end