class Superb::Context

A Context instance is a container for instance variables. These variables can then be applied to an ERB template.

Public Class Methods

new(options = {}) click to toggle source
# File lib/superb.rb, line 73
def initialize(options = {})
  self.merge!(options)
end

Public Instance Methods

apply_to(template) click to toggle source
# File lib/superb.rb, line 81
def apply_to(template)
  template.result(binding)
end
dup() click to toggle source
# File lib/superb.rb, line 77
def dup
  Superb::Context.new(self.to_hash)
end