Sha256: 7961162b4ec42eeecffd61dc3aceed63da74adfbbf4f9bb57ed35f1dd4031676
Contents?: true
Size: 565 Bytes
Versions: 14
Compression:
Stored size: 565 Bytes
Contents
class Kiss module TemplateMethods # Contains data set by action/mailer logic to be displayed in templates. def data @data end alias_method :vars, :data def data=(hash) @data = hash end alias_method :'vars=', :'data=' # Merges specified data (key-value pairs) into template data hash # (provided for backward-compatibility with apps pre-1.2). def set(vars) vars.each_pair do |key, value| @data[key] = value self.instance_variable_set(:"@#{key}", value) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems