Class: Toji::Calendar::DateRow
- Inherits:
-
Object
- Object
- Toji::Calendar::DateRow
- Defined in:
- lib/toji/calendar/date_row.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#kakes ⇒ Object
readonly
Returns the value of attribute kakes.
-
#kojis ⇒ Object
readonly
Returns the value of attribute kojis.
Instance Method Summary collapse
- #<<(schedule) ⇒ Object (also: #add)
-
#initialize(date) ⇒ DateRow
constructor
A new instance of DateRow.
Constructor Details
#initialize(date) ⇒ DateRow
Returns a new instance of DateRow.
8 9 10 11 12 |
# File 'lib/toji/calendar/date_row.rb', line 8 def initialize(date) @date = date @kojis = [] @kakes = [] end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
4 5 6 |
# File 'lib/toji/calendar/date_row.rb', line 4 def date @date end |
#kakes ⇒ Object (readonly)
Returns the value of attribute kakes.
6 7 8 |
# File 'lib/toji/calendar/date_row.rb', line 6 def kakes @kakes end |
#kojis ⇒ Object (readonly)
Returns the value of attribute kojis.
5 6 7 |
# File 'lib/toji/calendar/date_row.rb', line 5 def kojis @kojis end |
Instance Method Details
#<<(schedule) ⇒ Object Also known as: add
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/toji/calendar/date_row.rb', line 14 def <<(schedule) case schedule.rice_type when :koji index = schedule.step_weights.first[:index] @kojis[index] ||= DateColumn.new @kojis[index] << schedule when :kake index = schedule.step_weights.first[:index] @kakes[index] ||= DateColumn.new @kakes[index] << schedule end end |