Sha256: f3be2be910d2f7daf7fb305f04d8ca68cc21fa16e46711c2301cdcce49eba57c

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

require 'haml'

module Jass
  class Precompiler < Fold::Precompiler
    folds :Line, // 

    folds :ExampleGroup, /^describe / do
      "describe(\"#{text}\", {\n  #{render_children.join('  ,')}});\n\n"
    end

    folds :Example,      /^it / do
      "\"#{text}\": function() {\n  #{render_children}\n  }\n"
    end
  end
  
  class Engine < Fold::Engine
    Layout= Haml::Engine.new File.read("#{Lucky7Root}/lib/jsspec/layout.html.haml")
    
    def render
      Layout.render Object.new, {:test=>super}    
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
collin-lucky7-0.0.1 lib/jass.rb