Class: HtmlSkeleton
- Inherits:
-
Object
- Object
- HtmlSkeleton
- Defined in:
- lib/html_skeleton_table.rb,
lib/html_skeleton.rb,
lib/html_skeleton_calendar.rb
Overview
calendar methods ###################################################
Instance Attribute Summary collapse
-
#day_header ⇒ Object
readonly
Returns the value of attribute day_header.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#day_header ⇒ Object (readonly)
Returns the value of attribute day_header.
7 8 9 |
# File 'lib/html_skeleton_calendar.rb', line 7 def day_header @day_header end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/html_skeleton.rb', line 8 def end |
Instance Method Details
#calendar(options = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/html_skeleton.rb', line 10 def calendar( = {}, &) (, &) month = [:month] frame = month ? "div" : "table" body = month ? a_month([:year], month) : a_year([:year]) %(<#{frame} class="#{@options[:calendar_class]}"> #{body} </#{frame}>) end |
#table(rows, cols, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/html_skeleton.rb', line 18 def table(rows, cols, = {}, &) (, &) " <table class=\"\#{@options[:table_class]}\">\n \#{table_header(cols)}\n \#{table_body(rows, cols)}\n </table>\n TABLE\nend\n" |