Method: Test::Unit::Assertions#reflect_string

Defined in:
lib/assert2/rubynode_reflector.rb

#reflect_string(string) ⇒ Object

This compiles a string and reflects its source…

as another string.


58
59
60
61
62
63
64
65
# File 'lib/assert2/rubynode_reflector.rb', line 58

def reflect_string(string)
  rf = RubyReflector.new # def initialize

  rf.block = proc{}
  rf.reflect_values = false
    # pp string.parse_to_nodes.transform

  got = rf.reflect_nodes(string.parse_to_nodes)
  return got
end