podemos-info/census

View on GitHub
app/queries/people_by_born_date.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class PeopleByBornDate < Rectify::Query
  def self.for(born_at)
    new(born_at).query
  end

  def initialize(born_at)
    @born_at = born_at
  end

  def query
    Person.where(born_at: @born_at)
  end
end