Class: Toji::Calendar::DateColumn
- Inherits:
-
Object
- Object
- Toji::Calendar::DateColumn
- Defined in:
- lib/toji/calendar/date_column.rb
Instance Attribute Summary collapse
-
#rice_schedules ⇒ Object
readonly
Returns the value of attribute rice_schedules.
Instance Method Summary collapse
- #<<(schedule) ⇒ Object (also: #add)
-
#initialize ⇒ DateColumn
constructor
A new instance of DateColumn.
- #text ⇒ Object
Constructor Details
#initialize ⇒ DateColumn
Returns a new instance of DateColumn.
6 7 8 |
# File 'lib/toji/calendar/date_column.rb', line 6 def initialize @rice_schedules = [] end |
Instance Attribute Details
#rice_schedules ⇒ Object (readonly)
Returns the value of attribute rice_schedules.
4 5 6 |
# File 'lib/toji/calendar/date_column.rb', line 4 def rice_schedules @rice_schedules end |
Instance Method Details
#<<(schedule) ⇒ Object Also known as: add
10 11 12 |
# File 'lib/toji/calendar/date_column.rb', line 10 def <<(schedule) @rice_schedules << schedule end |
#text ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/toji/calendar/date_column.rb', line 15 def text @rice_schedules.map {|schedule| serial_num = schedule.product.serial_num weight = "%.17g" % schedule.expect.weight "#{serial_num}: #{weight}" }.join("<br>") end |