Module: Hiccup
- Included in:
- Schedule
- Defined in:
- lib/hiccup.rb,
lib/hiccup/version.rb,
lib/hiccup/schedule.rb,
lib/hiccup/inferable.rb,
lib/hiccup/enumerable.rb,
lib/hiccup/convenience.rb,
lib/hiccup/humanizable.rb,
lib/hiccup/validatable.rb,
lib/hiccup/core_ext/date.rb,
lib/hiccup/core_ext/hash.rb,
lib/hiccup/serializers/ical.rb,
lib/hiccup/core_ext/duration.rb,
lib/hiccup/serializable/ical.rb,
lib/hiccup/core_ext/enumerable.rb,
lib/hiccup/enumerable/never_enumerator.rb,
lib/hiccup/enumerable/weekly_enumerator.rb,
lib/hiccup/enumerable/monthly_enumerator.rb,
lib/hiccup/enumerable/annually_enumerator.rb,
lib/hiccup/enumerable/schedule_enumerator.rb
Overview
Hiccup
This module contains mixins that can apply, serialize, validate, and humanize an object that models a recurrence pattern and which exposes the following properties:
-
kind - One of :never, :weekly, :monthly, :annually # <== change to :none and :yearly
-
start_date - The date when the recurrence pattern should start
-
ends - true or false indicating whether the recurrence ever ends
-
end_date - The date when the recurrence pattern ends
-
skip - The number of instances to skip # <== change this to :interval
-
weekly_pattern - An array of recurrence rules for a weekly recurrence
-
monthly_pattern - An array of recurrence rules for a monthly recurrence
Examples:
Every other Monday :kind => :weekly, :weekly_pattern => ["Monday"] Every year on June 21 (starting in 1999) :kind => :yearly, :start_date => Date.new(1999, 6, 21) The second and fourth Sundays of the month :kind => :monthly, :monthly_pattern => [[2, "Sunday"], [4, "Sunday"]]
Defined Under Namespace
Modules: Convenience, CoreExt, CoreExtensions, Enumerable, Humanizable, Inferable, Serializable, Serializers, Validatable Classes: Schedule
Constant Summary collapse
- Kinds =
[:never, :weekly, :monthly, :annually]
- VERSION =
"0.4.2"
Instance Method Summary collapse
Instance Method Details
#hiccup(*modules) ⇒ Object
42 43 44 45 46 |
# File 'lib/hiccup.rb', line 42 def hiccup(*modules) = modules. add_hiccup_modules(modules) add_hiccup_serialization_formats([:serializable]) end |