lib/qonfig/commands/add_option.rb in qonfig-0.1.0 vs lib/qonfig/commands/add_option.rb in qonfig-0.2.0
- old
+ new
@@ -3,11 +3,11 @@
module Qonfig
module Commands
# @api private
# @since 0.1.0
class AddOption < Base
- # @return [String,Symbol]
+ # @return [Symbol, String]
#
# @api private
# @since 0.1.0
attr_reader :key
@@ -15,16 +15,21 @@
#
# @api private
# @since 0.1.0
attr_reader :value
- # @param key [String,Symbol]
+ # @param key [Symbol, String]
# @param value [Object]
#
+ # @raise [Qonfig::ArgumentError]
+ # @raise [Qonfig::CoreMethodIntersectionError]
+ #
# @api private
# @since 0.1.0
def initialize(key, value)
- @key = key
+ Qonfig::Settings::KeyGuard.prevent_incomparabilities!(key)
+
+ @key = key
@value = value
end
# @param settings [Qonfig::Settings]
# @return [void]