Class: Nodepile::RuleRecordEvaluator::EvalFrame

Inherits:
Object
  • Object
show all
Defined in:
lib/nodepile/rule_eval.rb

Overview

Utility class

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_hashlike) ⇒ EvalFrame

Returns a new instance of EvalFrame.



142
# File 'lib/nodepile/rule_eval.rb', line 142

def initialize(test_hashlike) = @__hm = test_hashlike

Class Method Details

.evaluate(defn, this_fieldname, test_hashlike) ⇒ Object



145
146
147
148
# File 'lib/nodepile/rule_eval.rb', line 145

def self.evaluate(defn,this_fieldname,test_hashlike)
    frame = new(HashMask.new(test_hashlike,this_fieldname)) #restrict access as tightly as reasonable
    frame.instance_eval(defn) # return the result
end

Instance Method Details

#vObject



143
# File 'lib/nodepile/rule_eval.rb', line 143

def v = @__hm