lib/angelo/tilt/erb.rb in angelo-0.1.0 vs lib/angelo/tilt/erb.rb in angelo-0.1.1

- old
+ new

@@ -50,10 +50,15 @@ end def erb view, opts = {locals: {}} locals = Hash === opts[:locals] ? opts[:locals] : {} - render = ->{self.class.templates[view].render self, locals} + render = case view + when String + ->{ view } + when Symbol + ->{self.class.templates[view].render self, locals} + end case opts[:layout] when false render[] when Symbol if lt = self.class.layout_templates[opts[:layout]]