Class: Readapt::Message::Evaluate

Inherits:
Base
  • Object
show all
Defined in:
lib/readapt/message/evaluate.rb

Instance Attribute Summary

Attributes inherited from Base

#arguments, #debugger

Instance Method Summary collapse

Methods inherited from Base

#body, #initialize, run, #set_body

Constructor Details

This class inherits a constructor from Readapt::Message::Base

Instance Method Details

#runObject



8
9
10
11
12
13
14
15
16
# File 'lib/readapt/message/evaluate.rb', line 8

def run
  ref = arguments['frameId']
  frame = debugger.frame(ref)
  expression = arguments['expression']
  result = ref ? frame.evaluate(expression) : eval(expression)
  set_body(
    result: result
  )
end