Sha256: e8633451a9ca7684530010d611e7e0ec4fcf22869ac4b9c71e5ebdf1236239a9
Contents?: true
Size: 836 Bytes
Versions: 20
Compression:
Stored size: 836 Bytes
Contents
# frozen_string_literal: true class Serega module SeregaPlugins module Metadata class MetaAttribute # # Validator for meta_attribute :hide_nil option # class CheckOptHideNil class << self # # Checks attribute :hide_nil option # # @param opts [Hash] Attribute options # # @raise [SeregaError] SeregaError that option has invalid value # # @return [void] # def call(opts) return unless opts.key?(:hide_nil) value = opts[:hide_nil] return if value == true raise SeregaError, "Invalid option :hide_nil => #{value.inspect}. Must be true" end end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems