class Boxes::Template::ERBContext
A context to render inside, to avoid polluting other classes.
Public Class Methods
new(args = {})
click to toggle source
Create a new context with a given hash of values.
@params args [Hash] the values to substitute.
# File lib/boxes/template.rb, line 38 def initialize(args = {}) args.each_pair do |k, v| instance_variable_set('@' + k.to_s, v) end end
Public Instance Methods
get_binding()
click to toggle source
The binding which is passed to ERB.
# File lib/boxes/template.rb, line 45 def get_binding # rubocop:disable Style/AccessorMethodName binding end