Class: IRB::Statement::Expression

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

Instance Attribute Summary

Attributes inherited from IRB::Statement

#code

Instance Method Summary collapse

Constructor Details

#initialize(code, is_assignment) ⇒ Expression

Returns a new instance of Expression.



39
40
41
42
# File 'lib/irb/statement.rb', line 39

def initialize(code, is_assignment)
  @code = code
  @is_assignment = is_assignment
end

Instance Method Details

#is_assignment?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/irb/statement.rb', line 52

def is_assignment?
  @is_assignment
end

#should_be_handled_by_debugger?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/irb/statement.rb', line 48

def should_be_handled_by_debugger?
  true
end

#suppresses_echo?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/irb/statement.rb', line 44

def suppresses_echo?
  @code.match?(/;\s*\z/)
end