Sha256: c2864eff2a9256393900847b84ee88b393887c539c5522505466e7abca4ef1bb

Contents?: true

Size: 691 Bytes

Versions: 3

Compression:

Stored size: 691 Bytes

Contents

# encoding: utf-8

require "tilt"
require "rango/mixins/chainable"

module Tilt
  ErubisTemplate.class_eval do
    extend Chainable
    chainable do
      def initialize_engine
        super
        require "rango/templates/exts/erubis"
      end
    end
  end

  # Tilt::HamlTemplate.options[:default_attributes] = {script: {type: "text/javascript"}, form: {method: "POST"}}
  HamlTemplate.class_eval do
    extend Chainable

    def self.options
      @options ||= Hash.new
    end

    chainable do
      def initialize_engine
        super
        require "rango/templates/exts/haml"
      end

      def haml_options
        super.merge!(self.class.options)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rango-0.2.3 lib/rango/templates/exts/tilt.rb
rango-0.2.1 lib/rango/templates/exts/tilt.rb
rango-0.2.1.pre lib/rango/templates/exts/tilt.rb