Class: When::V::Event::Enumerator::Logic::Second
- Inherits:
-
When::V::Event::Enumerator::Logic
- Object
- When::V::Event::Enumerator::Logic
- When::V::Event::Enumerator::Logic::Second
- Defined in:
- lib/when_exe/icalendar.rb
Overview
BYSECONDを実装
Instance Attribute Summary
Attributes inherited from When::V::Event::Enumerator::Logic
#by_part, #cash, #freq_index, #list
Instance Method Summary collapse
-
#initialize(by_part, list, lower = nil, upper = nil, leap = false) ⇒ Second
constructor
A new instance of Second.
Methods inherited from When::V::Event::Enumerator::Logic
Constructor Details
#initialize(by_part, list, lower = nil, upper = nil, leap = false) ⇒ Second
Returns a new instance of Second.
1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 |
# File 'lib/when_exe/icalendar.rb', line 1626 def initialize(by_part, list, lower=nil, upper=nil, leap=false) super(by_part, list) if lower @list = @list.map {|v| v -= 1 if leap && upper <= v && v < upper+1 raise ArgumentError, "#{by_part} out of range: #{v}" unless lower <= v && v < upper v } end end |