Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert generic HTMLTemplate

This reverts commits:
  4db1223
  37a3185
  • Loading branch information...
commit f6928eb413eca2800f37183060e3518fc393052c 1 parent 8f16b50
@rtomayko authored
Showing with 1 addition and 25 deletions.
  1. +1 −12 lib/tilt.rb
  2. +0 −13 test/tilt_htmltemplate_test.rb
View
13 lib/tilt.rb
@@ -93,6 +93,7 @@ def initialize_engine
@engine_initialized = false
class << self ; attr_accessor :engine_initialized ; end
+
# Load template source and compile the template. The template is
# loaded and compiled the first time this method is called; subsequent
# calls are no-ops.
@@ -206,18 +207,6 @@ def template_source
register 'str', StringTemplate
- # HTML pass-thru template.
- class HTMLTemplate < Template
- def compile!
- end
-
- def evaluate(scope, locals, &block)
- data
- end
- end
- register 'html', HTMLTemplate
-
-
# ERB template implementation. See:
# http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html
class ERBTemplate < Template
View
13 test/tilt_htmltemplate_test.rb
@@ -1,13 +0,0 @@
-require 'contest'
-require 'tilt'
-
-class HTMLTemplateTest < Test::Unit::TestCase
- test "is registered for '.html' files" do
- assert_equal Tilt::HTMLTemplate, Tilt['test.html']
- end
-
- test "compiling and evaluating the template with #render" do
- template = Tilt::HTMLTemplate.new { |t| "<html><head></head><body>Hello World!</body></html>" }
- assert_equal "<html><head></head><body>Hello World!</body></html>", template.render
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.