Parent

Methods

UnboundMethod

Public Instance Methods

to_ruby() click to toggle source
# File lib/parse_tree_extensions.rb, line 39
def to_ruby
  name = ProcStoreTmp.new_name
  ProcStoreTmp.send(:define_method, name, self)
  m = ProcStoreTmp.new.method(name)
  result = m.to_ruby.sub(/def #{name}(?:\(([^\)]*)\))?/,
                         'proc { |\1|').sub(/end\Z/, '}')
  return result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.