Sha256: ab5293121101e3843bd1ced63d5c531693f67a6193a07034f2f47531cdda70fa
Contents?: true
Size: 421 Bytes
Versions: 1
Compression:
Stored size: 421 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pagy-5.0.0 | lib/pagy/exceptions.rb |