Module: SimpleCalendar::ViewHelpers
- Defined in:
- lib/simple_calendar/view_helpers.rb
Instance Method Summary collapse
- #calendar(options = {}, &block) ⇒ Object
- #month_calendar(options = {}, &block) ⇒ Object
- #week_calendar(options = {}, &block) ⇒ Object
Instance Method Details
#calendar(options = {}, &block) ⇒ Object
3 4 5 6 |
# File 'lib/simple_calendar/view_helpers.rb', line 3 def calendar(={}, &block) raise 'calendar requires a block' unless block_given? SimpleCalendar::Calendar.new(self, ).render(&block) end |
#month_calendar(options = {}, &block) ⇒ Object
8 9 10 11 |
# File 'lib/simple_calendar/view_helpers.rb', line 8 def month_calendar(={}, &block) raise 'month_calendar requires a block' unless block_given? SimpleCalendar::MonthCalendar.new(self, ).render(&block) end |
#week_calendar(options = {}, &block) ⇒ Object
13 14 15 16 |
# File 'lib/simple_calendar/view_helpers.rb', line 13 def week_calendar(={}, &block) raise 'week_calendar requires a block' unless block_given? SimpleCalendar::WeekCalendar.new(self, ).render(&block) end |