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

Version Path
kiss-1.8.9 lib/kiss/accessors/template.rb
kiss-1.8.8 lib/kiss/accessors/template.rb
kiss-1.8.7 lib/kiss/accessors/template.rb
kiss-1.8.6 lib/kiss/accessors/template.rb
kiss-1.8.5 lib/kiss/accessors/template.rb
kiss-1.8.4 lib/kiss/accessors/template.rb
kiss-1.8.3 lib/kiss/accessors/template.rb
kiss-1.8.2 lib/kiss/accessors/template.rb
kiss-1.8.1 lib/kiss/accessors/template.rb
kiss-1.8 lib/kiss/accessors/template.rb
kiss-1.7.4 lib/kiss/accessors/template.rb
kiss-1.7.2 lib/kiss/accessors/template.rb
kiss-1.7.1 lib/kiss/accessors/template.rb
kiss-1.7 lib/kiss/accessors/template.rb