ice_cube 0.3.3 → 0.3.4
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/validations/day_of_month.rb +2 -2
- data/lib/ice_cube/validations/day_of_week.rb +2 -2
- data/lib/ice_cube/validations/day_of_year.rb +2 -2
- data/lib/ice_cube/validations/hour_of_day.rb +2 -2
- data/lib/ice_cube/validations/minute_of_hour.rb +2 -2
- data/lib/ice_cube/validations/second_of_minute.rb +2 -2
- data/lib/ice_cube/version.rb +1 -1
- metadata +2 -2
@@ -38,7 +38,7 @@ module IceCube
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def to_s
|
41
|
-
'on the ' << nice_numbers(@days_of_month) << (@days_of_month.
|
41
|
+
'on the ' << nice_numbers(@days_of_month) << (@days_of_month.size == 1 ? ' day' : ' days') << ' of the month' unless @days_of_month.empty?
|
42
42
|
end
|
43
43
|
|
44
44
|
def to_ical
|
@@ -47,4 +47,4 @@ module IceCube
|
|
47
47
|
|
48
48
|
end
|
49
49
|
|
50
|
-
end
|
50
|
+
end
|
@@ -30,7 +30,7 @@ module IceCube
|
|
30
30
|
representation = ''
|
31
31
|
representation << 'on the '
|
32
32
|
representation << @days_of_week.map do |day, occ|
|
33
|
-
nice_numbers(occ) << ' ' << Date::DAYNAMES[day] << (occ.
|
33
|
+
nice_numbers(occ) << ' ' << Date::DAYNAMES[day] << (occ.size != 1 ? 's' : '') unless @days_of_week.empty?
|
34
34
|
end.join(' and the ')
|
35
35
|
representation
|
36
36
|
end
|
@@ -45,4 +45,4 @@ module IceCube
|
|
45
45
|
|
46
46
|
end
|
47
47
|
|
48
|
-
end
|
48
|
+
end
|
@@ -37,7 +37,7 @@ module IceCube
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def to_s
|
40
|
-
'on the ' << nice_numbers(@days_of_year) << (@days_of_year.
|
40
|
+
'on the ' << nice_numbers(@days_of_year) << (@days_of_year.size == 1 ? ' day' : ' days') << ' of the year' unless @days_of_year.empty?
|
41
41
|
end
|
42
42
|
|
43
43
|
def to_ical
|
@@ -46,4 +46,4 @@ module IceCube
|
|
46
46
|
|
47
47
|
end
|
48
48
|
|
49
|
-
end
|
49
|
+
end
|
@@ -26,7 +26,7 @@ module IceCube
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def to_s
|
29
|
-
'on the ' << nice_numbers(@hours_of_day) << (@hours_of_day.
|
29
|
+
'on the ' << nice_numbers(@hours_of_day) << (@hours_of_day.size == 1 ? ' hour' : ' hours') << ' of the day' unless @hours_of_day.empty?
|
30
30
|
end
|
31
31
|
|
32
32
|
def to_ical
|
@@ -35,4 +35,4 @@ module IceCube
|
|
35
35
|
|
36
36
|
end
|
37
37
|
|
38
|
-
end
|
38
|
+
end
|
@@ -26,7 +26,7 @@ module IceCube
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def to_s
|
29
|
-
'on the ' << nice_numbers(@minutes_of_hour) << (@minutes_of_hour.
|
29
|
+
'on the ' << nice_numbers(@minutes_of_hour) << (@minutes_of_hour.size == 1 ? ' minute' : ' minutes') << ' of the hour' unless @minutes_of_hour.empty?
|
30
30
|
end
|
31
31
|
|
32
32
|
def to_ical
|
@@ -35,4 +35,4 @@ module IceCube
|
|
35
35
|
|
36
36
|
end
|
37
37
|
|
38
|
-
end
|
38
|
+
end
|
@@ -26,7 +26,7 @@ module IceCube
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def to_s
|
29
|
-
'on the ' << nice_numbers(@seconds_of_minute) << (@seconds_of_minute.
|
29
|
+
'on the ' << nice_numbers(@seconds_of_minute) << (@seconds_of_minute.size == 1 ? ' second' : ' seconds') << ' of the minute' unless @seconds_of_minute.empty?
|
30
30
|
end
|
31
31
|
|
32
32
|
def to_ical
|
@@ -35,4 +35,4 @@ module IceCube
|
|
35
35
|
|
36
36
|
end
|
37
37
|
|
38
|
-
end
|
38
|
+
end
|
data/lib/ice_cube/version.rb
CHANGED