Module: CalendarHelper

Defined in:
lib/table_builder/calendar_helper.rb

Defined Under Namespace

Classes: Calendar, CalendarBuilder

Instance Method Summary collapse

Instance Method Details

#calendar_for(objects, options = {}) ⇒ Object



3
4
5
6
7
8
# File 'lib/table_builder/calendar_helper.rb', line 3

def calendar_for objects, options = {}
  html_options = options.delete(:html)
  builder      = options.delete(:builder)  || CalendarBuilder
  calendar     = options.delete(:calendar) || Calendar
  concat (:table, html_options){ yield builder.new(objects || [], self, calendar, options) }
end