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.4.1 lib/simple_calendar/view_helpers.rb
simple_calendar-2.4.0 lib/simple_calendar/view_helpers.rb
simple_calendar-2.3.0 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.7 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.6 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.5 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.4 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.3 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.2 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.1 lib/simple_calendar/view_helpers.rb
simple_calendar-2.2.0 lib/simple_calendar/view_helpers.rb
simple_calendar-2.1.5 lib/simple_calendar/view_helpers.rb
simple_calendar-2.1.4 lib/simple_calendar/view_helpers.rb
simple_calendar-2.1.3 lib/simple_calendar/view_helpers.rb
simple_calendar-2.1.2 lib/simple_calendar/view_helpers.rb
simple_calendar-2.1.1 lib/simple_calendar/view_helpers.rb
simple_calendar-2.1.0 lib/simple_calendar/view_helpers.rb
simple_calendar-2.0.6 lib/simple_calendar/view_helpers.rb
simple_calendar-2.0.5 lib/simple_calendar/view_helpers.rb
simple_calendar-2.0.3 lib/simple_calendar/view_helpers.rb