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.7.pre8 lib/volt/controllers/template_helpers.rb
volt-0.9.7.pre7 lib/volt/controllers/template_helpers.rb
volt-0.9.7.pre6 lib/volt/controllers/template_helpers.rb
volt-0.9.7.pre5 lib/volt/controllers/template_helpers.rb
volt-0.9.7.pre3 lib/volt/controllers/template_helpers.rb
volt-0.9.7.pre2 lib/volt/controllers/template_helpers.rb
volt-0.9.6 lib/volt/controllers/template_helpers.rb
volt-0.9.6.pre3 lib/volt/controllers/template_helpers.rb
volt-0.9.6.pre2 lib/volt/controllers/template_helpers.rb
volt-0.9.6.pre1 lib/volt/controllers/template_helpers.rb
volt-0.9.5 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre12 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre11 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre9 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre8 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre7 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre6 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre5 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre4 lib/volt/controllers/template_helpers.rb
volt-0.9.5.pre3 lib/volt/controllers/template_helpers.rb