Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sebyx07 committed Aug 8, 2024
1 parent 0e04a6f commit c661a1b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ruby2html 🔮✨

Transform your Ruby code into beautiful, structured HTML with ease! 🚀
Transform your view logic into elegant, semantic HTML with the power of pure Ruby! 🚀

## 🌟 What is Ruby2html?

Expand Down Expand Up @@ -187,13 +187,18 @@ end

## Without Rails
```ruby
html = Ruby2html::Render.new(nil) do # nil is the context, you can use self or any other object
renderer = Ruby2html::Render.new(nil) do # nil is the context, you can use self or any other object
html do
h1 'Hello, World!'
head do
title 'Ruby2html Example'
end
body do
h1 'Hello, World!'
end
end
end

puts html.render
puts renderer.render # => "<html><head><title>Ruby2html Example</title></head><body><h1>Hello, World!</h1></body></html>"
```

## 🐢 Gradual Adoption
Expand Down

0 comments on commit c661a1b

Please sign in to comment.