Sha256: 7ccd57509eb0e1965258de5e20d92b309369fe08cc9dc9337ffe9c5833a1bf44

Contents?: true

Size: 326 Bytes

Versions: 21

Compression:

Stored size: 326 Bytes

Contents

module MagLove
  module Tilt
    class YamlTemplate < ::Tilt::Template
      self.default_mime_type = 'application/json'
    
      def prepare
      
      end

      def evaluate(scope, locals, &block)
        @output ||= YAML.load(data).to_json
      end

      def allows_script?
        false
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
maglove-0.8.1 lib/maglove/tilt/yaml_template.rb
maglove-0.8.0 lib/maglove/tilt/yaml_template.rb
maglove-0.7.2 lib/maglove/tilt/yaml_template.rb
maglove-0.7.1 lib/maglove/tilt/yaml_template.rb
maglove-0.7.0 lib/maglove/tilt/yaml_template.rb
maglove-0.6.6 lib/maglove/tilt/yaml_template.rb
maglove-0.6.5 lib/maglove/tilt/yaml_template.rb
maglove-0.6.4 lib/maglove/tilt/yaml_template.rb
maglove-0.6.3 lib/maglove/tilt/yaml_template.rb
maglove-0.6.2 lib/maglove/tilt/yaml_template.rb
maglove-0.6.1 lib/maglove/tilt/yaml_template.rb
maglove-0.6.0 lib/maglove/tilt/yaml_template.rb
maglove-0.5.9 lib/maglove/tilt/yaml_template.rb
maglove-0.5.8 lib/maglove/tilt/yaml_template.rb
maglove-0.5.7 lib/maglove/tilt/yaml_template.rb
maglove-0.5.5 lib/maglove/tilt/yaml_template.rb
maglove-0.5.4 lib/maglove/tilt/yaml_template.rb
maglove-0.5.2 lib/maglove/tilt/yaml_template.rb
maglove-0.5.1 lib/maglove/tilt/yaml_template.rb
maglove-0.5.0 lib/maglove/tilt/yaml_template.rb