Sha256: 5ff5aded961202507d08dc99d18587ba404b9cbb3a5043903798af063cc9ff42
Contents?: true
Size: 423 Bytes
Versions: 10
Compression:
Stored size: 423 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 end # specific overflow error class OverflowError < VariableError; end end
Version data entries
10 entries across 10 versions & 2 rubygems