class NetCity::Diary
Attributes
end[R]
start[R]
Public Class Methods
new(hash)
click to toggle source
# File lib/netcity/data.rb, line 20 def initialize(hash) @start = hash['weekStart'] @end = hash['weekEnd'] @days = hash['weekDays'].map { |h| Day.new(h) } end
Public Instance Methods
[](index)
click to toggle source
# File lib/netcity/data.rb, line 26 def [](index) @days[index] end
each(&block)
click to toggle source
# File lib/netcity/data.rb, line 30 def each(&block) @days.each { |lesson| block.call(day) } end