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