Sha256: e96fd1eca68956921dfecb48fd7ad024fad3d136768ba75ed5ef994c8aa8c9ad

Contents?: true

Size: 399 Bytes

Versions: 33

Compression:

Stored size: 399 Bytes

Contents

module Volt
  module TemplateHelpders
    module ClassMethods
      def template(name, template, bindings)
        @templates[name] = { 'html' => template, 'bindings' => bindings }
      end
    end

    def self.included(base)
      # Setup blank templates class variable
      base.class_attribute :__templates
      base.__templates = {}

      base.send :extend, ClassMethods
    end
  end


end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
volt-0.9.5.pre2 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre1 lib/volt/controllers/template_helpers.rb
volt-0.9.4 lib/volt/controllers/template_helpers.rb
volt-0.9.4.pre5 lib/volt/controllers/template_helpers.rb
volt-0.9.4.pre3 lib/volt/controllers/template_helpers.rb
volt-0.9.4.pre2 lib/volt/controllers/template_helpers.rb
volt-0.9.4.pre1 lib/volt/controllers/template_helpers.rb
volt-0.9.3 lib/volt/controllers/template_helpers.rb
volt-0.9.3.pre6 lib/volt/controllers/template_helpers.rb
volt-0.9.3.pre5 lib/volt/controllers/template_helpers.rb
volt-0.9.3.pre4 lib/volt/controllers/template_helpers.rb
volt-0.9.3.pre3 lib/volt/controllers/template_helpers.rb
volt-0.9.3.pre2 lib/volt/controllers/template_helpers.rb