diff --git a/src/blueprint/html/builder.cr b/src/blueprint/html/builder.cr
index 35e8e04..0fe8363 100644
--- a/src/blueprint/html/builder.cr
+++ b/src/blueprint/html/builder.cr
@@ -1,27 +1,23 @@
module Blueprint::HTML
# EXPERIMENTAL
- def self.build(&)
- Builder.build do |builder|
- with builder yield
- end
+ def self.build(&) : String
+ Builder.build { |builder| with builder yield }
end
private struct Builder
include Blueprint::HTML
- def self.build(&)
+ def self.build(&) : String
builder = new
- builder.build do
- yield builder
- end
+ builder.build { yield builder }
end
- private def blueprint(&)
- yield
+ def build(&) : String
+ to_html { with self yield }
end
- protected def build(&)
- to_html { with self yield }
+ private def blueprint(&) : Nil
+ yield
end
end
end