How to count a method within a method
问题 If we create a new method called days_left_in_current_level , what would we need to put in there so that we can count how many days are left in the current_level ? habit.rb def current_level return 0 unless date_started def committed_wdays committed.map do |day| Date::ABBR_DAYNAMES.index(day.titleize) end end def n_days ((date_started.to_date)..Date.today).count do |date| committed_wdays.include? date.wday end - self.real_missed_days end case n_days # 1 - 6 represent the different levels when