Sha256: 360c469e8025b372703c6d63ca27c99cfe924fc74982884b86bd632b14af87f2
Contents?: true
Size: 411 Bytes
Versions: 8
Compression:
Stored size: 411 Bytes
Contents
# frozen_string_literal: true class Pagy # generic variable error class VariableError < ArgumentError attr_reader :pagy def initialize(pagy) super @pagy = pagy end def variable message =~ /expected :(\w+)/ Regexp.last_match(1)&.to_sym end def value = pagy.vars[variable] end # specific overflow error class OverflowError < VariableError; end end
Version data entries
8 entries across 8 versions & 1 rubygems