require 'blankslate' # Provides a context for tree transformations to run in. The context allows # accessing each of the bindings in the bindings hash as local method. # # Example: # # ctx = Context.new(:a => :b) # ctx.instance_eval do # a # => :b # end # # @api private class Parslet::Context < BlankSlate reveal :methods reveal :respond_to? reveal :inspect reveal :to_s reveal :instance_variable_set def meta_def(name, &body) metaclass = class <