ice_cube 0.2.6.1 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ice_cube/schedule.rb +10 -0
- data/lib/ice_cube/version.rb +1 -1
- metadata +3 -4
data/lib/ice_cube/schedule.rb
CHANGED
@@ -66,12 +66,20 @@ module IceCube
|
|
66
66
|
@rrule_occurrence_heads << RuleOccurrence.new(rule, @start_date)
|
67
67
|
end
|
68
68
|
|
69
|
+
def rrules
|
70
|
+
@rrule_occurrence_heads.map { |h| h.rule }
|
71
|
+
end
|
72
|
+
|
69
73
|
# Add a rule of any type as an exception to this schedule
|
70
74
|
def add_exception_rule(rule)
|
71
75
|
raise ArgumentError.new('Argument must be a valid rule') unless rule.class < Rule
|
72
76
|
@exrule_occurrence_heads << RuleOccurrence.new(rule, @start_date)
|
73
77
|
end
|
74
78
|
|
79
|
+
def exrules
|
80
|
+
@exrule_occurrence_heads.map { |h| h.rule }
|
81
|
+
end
|
82
|
+
|
75
83
|
# Add an individual date to this schedule
|
76
84
|
def add_recurrence_date(date)
|
77
85
|
@rdates << date
|
@@ -82,6 +90,8 @@ module IceCube
|
|
82
90
|
@exdates << date
|
83
91
|
end
|
84
92
|
|
93
|
+
attr_reader :rdates, :exdates
|
94
|
+
|
85
95
|
private
|
86
96
|
|
87
97
|
# Find all occurrences (following rules and exceptions) from the schedule's start date to end_date.
|
data/lib/ice_cube/version.rb
CHANGED
metadata
CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.2.6.1
|
8
|
+
- 7
|
9
|
+
version: 0.2.7
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- John Crepezzi
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-07 00:00:00 -04:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|