class ERB::Context
Public Class Methods
new(vars)
click to toggle source
– Wraps any data you wish to send to ERB
limiting it's context access. @param [Hash] vars the variables you wish to set –
# File lib/erb/context.rb, line 13 def initialize(vars) vars.each do |key, val| instance_variable_set("@#{key}", val) end end
Public Instance Methods
_binding()
click to toggle source
– Returns the binding so that we can ship it off and give it to ERB
. –
# File lib/erb/context.rb, line 22 def _binding return binding end