Class: ATP::Processors::Marshal

Inherits:
ATP::Processor show all
Defined in:
lib/atp/processors/marshal.rb

Overview

Makes the AST safe for Marshaling

Instance Method Summary collapse

Methods inherited from ATP::Processor

#handler_missing, #n, #n0, #n1, #process, #run

Instance Method Details

#on_object(node) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/atp/processors/marshal.rb', line 5

def on_object(node)
  if node.value.is_a?(String)
    node
  else
    node.updated(nil, [node.value.name])
  end
end