Class: Readapt::Message::Scopes

Inherits:
Base
  • Object
show all
Defined in:
lib/readapt/message/scopes.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



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/readapt/message/scopes.rb', line 6

def run
  frame = debugger.frame(arguments['frameId'])
  set_body({
    scopes: [
      {
        name: 'Local',
        variablesReference: frame.local_id,
        expensive: false
      },
      {
        name: 'Global',
        # @todo 1 is a magic number representing the toplevel binding
        variablesReference: 1,
        expensive: true
      }
    ]
  })
end