Created
February 26, 2016 09:35
-
-
Save kkismd/494397046385f0ad18fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cgi/util' | |
require 'cgi/html' | |
ch5 = CGI::HTML5.new | |
puts ch5.instance_eval { | |
html { | |
head { | |
title { "XML encoding with Ruby" } | |
} + | |
body { | |
h1 { "XML encoding with Ruby" } + | |
p { "this format can be used as an alternative markup to XML" } + | |
a(href: "https://www.ruby-lang.org/") { "Ruby" } + | |
p { | |
"This is some" + | |
b { "mixed" } + | |
"text. For more see the" + | |
a(href: "https://www.ruby-lang.org/") { "Ruby" } + | |
"project" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment