Class: GroupSchedule
- Inherits:
-
Object
- Object
- GroupSchedule
- Defined in:
- lib/group_scheduler.rb
Instance Attribute Summary collapse
-
#group_schedule ⇒ Object
readonly
Returns the value of attribute group_schedule.
Instance Method Summary collapse
- #day_schedule(week_day) ⇒ Object
-
#initialize(group) ⇒ GroupSchedule
constructor
A new instance of GroupSchedule.
Constructor Details
#initialize(group) ⇒ GroupSchedule
Returns a new instance of GroupSchedule.
5 6 7 8 |
# File 'lib/group_scheduler.rb', line 5 def initialize group @group = validate_group(group) @group_schedule = load_schedule end |
Instance Attribute Details
#group_schedule ⇒ Object (readonly)
Returns the value of attribute group_schedule.
3 4 5 |
# File 'lib/group_scheduler.rb', line 3 def group_schedule @group_schedule end |
Instance Method Details
#day_schedule(week_day) ⇒ Object
10 11 12 13 |
# File 'lib/group_scheduler.rb', line 10 def day_schedule week_day week_day_obj = Weekday.new(week_day) group_schedule[week_day_obj.symbol] end |