Class: Pry::Result
Overview
Wraps the return result of process_commands, indicates if the result IS a command and what kind of command (e.g void)
Instance Attribute Summary (collapse)
-
- (Object) retval
readonly
Returns the value of attribute retval.
Instance Method Summary (collapse)
-
- (Boolean) command?
Is the result a command?.
-
- (Result) initialize(is_command, retval = nil)
constructor
A new instance of Result.
-
- (Boolean) void_command?
Is the result a command and if it is, is it a void command? (one that does not return a value).
Constructor Details
- (Result) initialize(is_command, retval = nil)
A new instance of Result
377 378 379 |
# File 'lib/pry/command_set.rb', line 377 def initialize(is_command, retval = nil) @is_command, @retval = is_command, retval end |
Instance Attribute Details
- (Object) retval (readonly)
Returns the value of attribute retval
375 376 377 |
# File 'lib/pry/command_set.rb', line 375 def retval @retval end |
Instance Method Details
- (Boolean) command?
Is the result a command?
383 384 385 |
# File 'lib/pry/command_set.rb', line 383 def command? @is_command end |
- (Boolean) void_command?
Is the result a command and if it is, is it a void command? (one that does not return a value)
390 391 392 |
# File 'lib/pry/command_set.rb', line 390 def void_command? retval == Command::VOID_VALUE end |