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.



60
61
62
63
64
# File 'lib/irb/statement.rb', line 60

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.



58
59
60
# File 'lib/irb/statement.rb', line 58

def arg
  @arg
end

#command_classObject (readonly)

Returns the value of attribute command_class.



58
59
60
# File 'lib/irb/statement.rb', line 58

def command_class
  @command_class
end

Instance Method Details

#is_assignment?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/irb/statement.rb', line 66

def is_assignment?
  false
end

#should_be_handled_by_debugger?Boolean

Returns:

  • (Boolean)


74
75
76
77
# File 'lib/irb/statement.rb', line 74

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

#suppresses_echo?Boolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/irb/statement.rb', line 70

def suppresses_echo?
  true
end