Sha256: 5e6c63eb666fc3c39ae9a6e2fc3cf6888a44fa973361f4e75ac9fe32d0429e13
Contents?: true
Size: 464 Bytes
Versions: 15
Compression:
Stored size: 464 Bytes
Contents
module NxtSupport module Preprocessors class WrongTypeError < StandardError; end class DowncasePreprocessor attr_accessor :value def initialize(value) @value = value end def call return if value.nil? value.downcase! value rescue NoMethodError => e raise WrongTypeError, "Tried to call #{e.name} on #{value}, but #{value} does not respond to #{e.name}" end end end end
Version data entries
15 entries across 15 versions & 1 rubygems