Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use the markaby module now built into tilt. Closes #24

  • Loading branch information...
commit 25e21c02aefdfe157fab02e452eb9b9ed5d2887f 1 parent 5a7daf3
@smtlaissezfaire smtlaissezfaire authored
Showing with 6 additions and 38 deletions.
  1. +4 −2 README.rdoc
  2. +2 −36 lib/markaby/tilt.rb
View
6 README.rdoc
@@ -72,8 +72,10 @@ If you are looking for sinatra support pre 0.7, see http://github.com/sbfaulkner
== Using Markaby with other frameworks
-Markaby has a Tilt module, so in principle, any web framework that supports
-Tilt can/will also support Markaby.
+Tilt has a Markaby module, so in principle, any web framework that supports
+Tilt will also support Markaby. See the appropriate tilt documentation:
+
+ http://github.com/rtomayko/tilt
== Using Markaby as a Ruby class
View
38 lib/markaby/tilt.rb
@@ -3,40 +3,6 @@
module Markaby
module Tilt
- class Template < ::Tilt::Template
- class TiltBuilder < Markaby::Builder
- def __capture_markaby_tilt__(&block)
- __run_markaby_tilt__ do
- text capture(&block)
- end
- end
- end
-
- def evaluate(scope, locals, &block)
- builder = TiltBuilder.new({}, scope)
- builder.locals = locals
-
- if block
- builder.instance_eval <<-CODE, __FILE__, __LINE__
- def __run_markaby_tilt__
- #{data}
- end
- CODE
-
- builder.__capture_markaby_tilt__(&block)
- else
- builder.instance_eval(data, __FILE__, __LINE__)
- end
-
- builder.to_s
- end
-
- def prepare; end
- end
+ Template = ::Tilt::MarkabyTemplate
end
-end
-
-module Tilt
- MarkabyTemplate = Markaby::Tilt::Template
- register :mab, MarkabyTemplate
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.