Class: Kenma::PreProcessor
Class Method Summary
collapse
#node_missing
#NODE_GASGN, #NODE_GVAR, #eval!, #node_bind!, #stringify!, #symbolify!, #unstringify!
#initialize, #use_macro!
#convert, #initialize
Class Method Details
.compile(node, context = {}) ⇒ Object
19
20
21
|
# File 'lib/kenma/pre_processor.rb', line 19
def self.compile(node, context = {})
new(context).compile(node)
end
|
.compile_of(body, context = {}) ⇒ Object
23
24
25
26
|
# File 'lib/kenma/pre_processor.rb', line 23
def self.compile_of(body, context = {})
bind = body.binding unless context[:bind]
compile(RubyVM::AbstractSyntaxTree.of(body), { bind: bind }.merge(context))
end
|