class Pagy::Calendar

def initialize(vars) # rubocop:disable Lint/MissingSuper

rubocop:disable Lint/MissingSuper
Merge and validate the options, do some simple arithmetic and set a few instance variables
def initialize(vars) # rubocop:disable Lint/MissingSuper
  normalize_vars(vars)
  setup_vars(page: 1, week_offset: 0)
  setup_unit_vars
  raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
  @prev = (@page - 1 unless @page == 1)
  @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
end