Skip to content

Commit

Permalink
Autoload all Tilt template classes
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed May 13, 2013
1 parent 45ed232 commit b12a1a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/tilt/mapping.rb
Expand Up @@ -13,7 +13,12 @@ def initialize_copy(other)
end

def register_lazy(class_name, file, *extensions)
class_name = "Tilt::#{class_name}" if class_name.is_a?(Symbol)
# Internal API
if class_name.is_a?(Symbol)
Tilt.autoload class_name, file
class_name = "Tilt::#{class_name}"
end

extensions.each do |ext|
@lazy_map[ext].unshift([class_name, file])
end
Expand Down

0 comments on commit b12a1a4

Please sign in to comment.