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.



1316
1317
1318
1319
# File 'lib/when_exe/icalendar.rb', line 1316

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

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



1297
1298
1299
# File 'lib/when_exe/icalendar.rb', line 1297

def date
  @date
end

#indexObject (readonly)

Returns the value of attribute index.



1296
1297
1298
# File 'lib/when_exe/icalendar.rb', line 1296

def index
  @index
end

Instance Method Details

#_current_dateObject



1300
1301
1302
# File 'lib/when_exe/icalendar.rb', line 1300

def _current_date
  return @date[@index]
end

#_incObject



1310
1311
1312
1313
# File 'lib/when_exe/icalendar.rb', line 1310

def _inc
  @index += 1
  return self
end

#_previuos_dateObject



1305
1306
1307
# File 'lib/when_exe/icalendar.rb', line 1305

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