Class: When::V::Event::Enumerator::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/when_exe/icalendar.rb

Overview

多重繰り返しの現在状態

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(date) ⇒ Step

Returns a new instance of Step.



1360
1361
1362
1363
# File 'lib/when_exe/icalendar.rb', line 1360

def initialize(date)
  @index = 0
  @date  = date.kind_of?(Array) ? date : [date]
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



1341
1342
1343
# File 'lib/when_exe/icalendar.rb', line 1341

def date
  @date
end

#indexObject (readonly)

Returns the value of attribute index.



1340
1341
1342
# File 'lib/when_exe/icalendar.rb', line 1340

def index
  @index
end

Instance Method Details

#_current_dateObject



1344
1345
1346
# File 'lib/when_exe/icalendar.rb', line 1344

def _current_date
  return @date[@index]
end

#_incObject



1354
1355
1356
1357
# File 'lib/when_exe/icalendar.rb', line 1354

def _inc
  @index += 1
  return self
end

#_previuos_dateObject



1349
1350
1351
# File 'lib/when_exe/icalendar.rb', line 1349

def _previuos_date
  return @date[@index-1]
end