Class: Toodledo::Repeat
- Inherits:
-
Object
- Object
- Toodledo::Repeat
- Defined in:
- lib/toodledo/repeat.rb
Constant Summary collapse
- NONE =
TODO Refactor
0
- WEEKLY =
1
- MONTHLY =
2
- YEARLY =
3
- DAILY =
4
- BIWEEKLY =
5
- BIMONTHLY =
6
- SEMIANNUALLY =
7
- QUARTERLY =
8
- WITH_PARENT =
9
- REPEAT_ARRAY =
[ NONE, WEEKLY, MONTHLY, YEARLY, DAILY, BIWEEKLY, BIMONTHLY, SEMIANNUALLY, QUARTERLY, WITH_PARENT ]
Class Method Summary collapse
- .each ⇒ Object
-
.valid?(input) ⇒ Boolean
TODO replace with include?.
Class Method Details
.each ⇒ Object
32 33 34 |
# File 'lib/toodledo/repeat.rb', line 32 def self.each REPEAT_ARRAY.each{|value| yield(value)} end |
.valid?(input) ⇒ Boolean
TODO replace with include?
37 38 39 40 41 42 43 44 |
# File 'lib/toodledo/repeat.rb', line 37 def self.valid?(input) for repeat in REPEAT_ARRAY if (repeat == input) return true end end return false end |