class NetCity::Day

Attributes

date[R]

Public Class Methods

new(hash) click to toggle source
# File lib/netcity/data.rb, line 40
def initialize(hash)
  @date    = hash['date']
  @lessons = hash['lessons'].map { |h| Lesson.new(h) }
end

Public Instance Methods

[](index) click to toggle source
# File lib/netcity/data.rb, line 45
def [](index)
  @lessons[index]
end
each(&block) click to toggle source
# File lib/netcity/data.rb, line 49
def each(&block)
  @lessons.each { |lesson| block.call(lesson) }
end