Sha256: ac880340fa76e19ba7b65df0a85198686abf34ddfff215aa6c10960933933bea

Contents?: true

Size: 593 Bytes

Versions: 11

Compression:

Stored size: 593 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

11 entries across 11 versions & 1 rubygems

Version Path
simple_calendar-1.1.10 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.9 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.8 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.7 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.6 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.5 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.4 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.3 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.2 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.1 lib/simple_calendar/view_helpers.rb
simple_calendar-1.1.0 lib/simple_calendar/view_helpers.rb