class ContextHolder
Public Class Methods
new(context, parent_context = nil)
click to toggle source
Calls superclass method
# File lib/thymeleaf/context/context_holder.rb, line 6 def initialize(context, parent_context = nil) if context.is_a? Hash super(ContextStruct.new(context), parent_context) else super(context, parent_context) end end
Public Instance Methods
evaluate(expr)
click to toggle source
# File lib/thymeleaf/context/context_holder.rb, line 14 def evaluate(expr) instance_eval(expr.to_s) end
method_missing(m, *args)
click to toggle source
# File lib/thymeleaf/context/context_holder.rb, line 18 def method_missing(m, *args) if context.respond_to? m context.send(m, *args) elsif !parent_context.nil? parent_context.send(m, *args) end end
root()
click to toggle source
# File lib/thymeleaf/context/context_holder.rb, line 26 def root if parent_context.nil? context else parent_context.root end end