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.



1313
1314
1315
1316
# File 'lib/when_exe/icalendar.rb', line 1313

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

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



1294
1295
1296
# File 'lib/when_exe/icalendar.rb', line 1294

def date
  @date
end

#indexObject (readonly)

Returns the value of attribute index.



1293
1294
1295
# File 'lib/when_exe/icalendar.rb', line 1293

def index
  @index
end

Instance Method Details

#_current_dateObject



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

def _current_date
  return @date[@index]
end

#_incObject



1307
1308
1309
1310
# File 'lib/when_exe/icalendar.rb', line 1307

def _inc
  @index += 1
  return self
end

#_previuos_dateObject



1302
1303
1304
# File 'lib/when_exe/icalendar.rb', line 1302

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