hebrew_date 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hebrew_date.gemspec +1 -1
- data/lib/hebrew_date.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f1b49cae0024483d43817d6944b3f4835e1553c
|
4
|
+
data.tar.gz: 058d5d6b13a409ba2bff70facff46fe744ded362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9f561aaf0bca69366b5381abdd824f832d005635a9173f68291b50abfd1559a99b9762a669cc4bddedad7a45ced2a0d9e5a7800f7ce4a8e377e4e6363e1ca73
|
7
|
+
data.tar.gz: fd4d4a94bff6cfadfbc265a9c4c68c8d9116f7317eb32711e381a486eec18bfe0a6f8713815c16b168eb4b20c664b0d1b14b8bf0e4e5e7a5c31f56edc0d84e09
|
data/hebrew_date.gemspec
CHANGED
data/lib/hebrew_date.rb
CHANGED
@@ -119,7 +119,7 @@ class HebrewDate < Delegator
|
|
119
119
|
|
120
120
|
# Iterates evaluation of the given block, which takes a HebrewDate object.
|
121
121
|
# The limit should be a Date or HebrewDate object.
|
122
|
-
def step(limit, step=1)
|
122
|
+
def step(limit, step=1, &block)
|
123
123
|
return to_enum(:step, limit, step) unless block_given?
|
124
124
|
(self..limit).step(step) { |date| yield(date) }
|
125
125
|
end
|
@@ -127,7 +127,7 @@ class HebrewDate < Delegator
|
|
127
127
|
# This method is equivalent to step(min, -1){|date| ...}.
|
128
128
|
# @param min [Integer]
|
129
129
|
# @return [Enumerator|self]
|
130
|
-
def downto(min)
|
130
|
+
def downto(min, &block)
|
131
131
|
return to_enum(:downto, min) unless block_given?
|
132
132
|
self.step(min, -1, &block)
|
133
133
|
end
|
@@ -135,7 +135,7 @@ class HebrewDate < Delegator
|
|
135
135
|
# This method is equivalent to step(max, 1){ |date| ...}.
|
136
136
|
# @param max [Integer]
|
137
137
|
# @return [Enumerator|self]
|
138
|
-
def upto(max)
|
138
|
+
def upto(max, &block)
|
139
139
|
return to_enum(:upto, max) unless block_given?
|
140
140
|
self.step(max, 1, &block)
|
141
141
|
end
|