lib/cal/day_name.rb in cal-0.6.1 vs lib/cal/day_name.rb in cal-0.6.2

- old
+ new

@@ -1,8 +1,7 @@ module Cal class DayName - class << self def all(options = {}) if options[:start_on] sunday_to_saturday.rotate(send(options[:start_on].to_s.downcase.to_sym).position - 1) else @@ -36,11 +35,11 @@ def saturday @saturday ||= new :saturday, 'Saturday', 7 end - private + private def sunday_to_saturday @sunday_to_saturday ||= [sunday, monday, tuesday, wednesday, thursday, friday, saturday] end end @@ -66,8 +65,7 @@ def previous self.class.all.detect do |day_name| day_name.position == (position > 1 ? position - 1 : 7) end end - end end \ No newline at end of file