lib/serega/plugins/metadata/validations/check_opts.rb in serega-0.1.5 vs lib/serega/plugins/metadata/validations/check_opts.rb in serega-0.2.0
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
class Serega
- module Plugins
+ module SeregaPlugins
module Metadata
class MetaAttribute
class CheckOpts
class << self
#
@@ -11,18 +11,18 @@
# Checks used options are allowed and then checks options values.
#
# @param opts [Hash] Attribute options
# @param attribute_keys [Array<Symbol>] Allowed options keys
#
- # @raise [Error] when attribute has invalid options
+ # @raise [SeregaError] when attribute has invalid options
#
# @return [void]
#
def call(opts, attribute_keys)
opts.each_key do |key|
next if attribute_keys.include?(key.to_sym)
- raise Error, "Invalid option #{key.inspect}. Allowed options are: #{attribute_keys.map(&:inspect).join(", ")}"
+ raise SeregaError, "Invalid option #{key.inspect}. Allowed options are: #{attribute_keys.map(&:inspect).join(", ")}"
end
check_each_opt(opts)
end