Module: TimeRounder::LoadSchedule

Included in:
RoundedTime, RoundedTimeFromSeconds
Defined in:
lib/time_rounder/load_schedule.rb

Overview

Handles loading of the proper schedule

Instance Method Summary collapse

Instance Method Details

#get_schedule(minutes) ⇒ Object

loads the proper schedule based what minute is passed


9
10
11
12
13
14
15
16
# File 'lib/time_rounder/load_schedule.rb', line 9

def get_schedule(minutes)
  case minutes
  when 15
    self.class.send(:include, TimeRounder::Schedule::FifteenMinute)
  else
    raise TimeRounder::ScheduleNotFound
  end
end