html-builder 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/html-builder.rb +24 -0
  2. metadata +1 -1
data/lib/html-builder.rb CHANGED
@@ -1,6 +1,30 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
3
  class HtmlBuilder
4
+ # HtmlBuilder
5
+ #
6
+ # Example:
7
+ # require 'html-builder'
8
+ #
9
+ # puts HtmlBuilder.html {
10
+ # head {
11
+ # title "Hello HtmlBuilder"
12
+ # }
13
+ # body {
14
+ # text "Hello ", a("HtmlBuilder", :href => "http://github.com/jinchizhong/html-builder"), "."
15
+ # }
16
+ # }
17
+ # Got:
18
+ # <html>
19
+ # <head>
20
+ # <title>Hello HtmlBuilder</title>
21
+ # </head>
22
+ # <body>
23
+ # Hello <a href="http://github.com/jinchizhong/html-builder">HtmlBuilder</a>.
24
+ # </body>
25
+ # </html>
26
+ # Just so easy...
27
+
4
28
  def initialize name, attrs, text
5
29
  @name = name
6
30
  @attrs = attrs
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: