lib/mass_shootings/tracker.rb
#
# Retrieves all `Shooting`s that occurred within a date range.
# @param [Range<Date>] date_range the date range to search. Inclusive and
#        exclusive ranges are both supported.
# @return [Array<Shooting>]
#
Retrieves all `Shooting`s that occurred within a date range.
Retrieves all ` Shooting ` s that occurred within a date range .
def in_date_range(date_range)
        pages_in_date_range(date_range).
          map(&method(:page)).
          flat_map(&:to_a).
          select { |shooting| date_range.cover? shooting.date }
      end
def in_date_range ( date_range ) pages_in_date_range ( date_range ) . map ( & method ( :page ) ) . flat_map ( & :to_a ) . select { | shooting | date_range . cover? shooting . date } end
Retrieves all `Shooting`s that occurred within a date range.
Retrieves all ` Shooting ` s that occurred within a date range .
None
Array<Shooting>
date_range
date_range the date range to search. Inclusive and exclusive ranges are both supported.
date_range the date range to search . Inclusive and exclusive ranges are both supported .