Sha256: 789fa1e83478df3c3f51e957ae10a470a8e68026adcbd5e0052bf69a9d15c6f4

Contents?: true

Size: 596 Bytes

Versions: 23

Compression:

Stored size: 596 Bytes

Contents

module SimpleCalendar
  module ViewHelpers
    def calendar(options={}, &block)
      raise 'calendar requires a block' unless block_given?
      SimpleCalendar::Calendar.new(self, options).render(&block)
    end

    def month_calendar(options={}, &block)
      raise 'month_calendar requires a block' unless block_given?
      SimpleCalendar::MonthCalendar.new(self, options).render(&block)
    end

    def week_calendar(options={}, &block)
      raise 'week_calendar requires a block' unless block_given?
      SimpleCalendar::WeekCalendar.new(self, options).render(&block)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
simple_calendar-2.0.2 lib/simple_calendar/view_helpers.rb
simple_calendar-2.0.1 lib/simple_calendar/view_helpers.rb
simple_calendar-2.0.0 lib/simple_calendar/view_helpers.rb