Project

htmlcom

0.0
Low commit activity in last 3 years
No release in over a year
Generates HTML components and is designed for rendering dynamic web pages from a web server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.3, >= 0.3.1
~> 0.1, >= 0.1.2
~> 0.3, >= 0.3.6
~> 0.3, >= 0.3.2
 Project Readme

Introducing the htmlcom gem

require 'htmlcom'

tabs = HtmlCom::Tabs.new headings: %w(London Paris Dublin)

tabs.tab[0].content = '<p>Hello!</p>'
tabs.tab[1].content = '<p>Tab 2</p>'
#tabs.tab[1].delete
#tabs.delete_tab 1
tabs.add_tab 'Russia', content: '<p>Tab 4</p>'
puts tabs.to_html
#tabs.active = '3'
tabs.active = '2'
File.write '/tmp/foo.html', tabs.to_webpage
`firefox /tmp/foo.html &`

The above example demonstrates how to change the content of 1 or more tabs rendered in HTML dynamically using Ruby.

Resources

htmlcom html component tab tabs jsmenubuilder