Knot::Protocol::Idx fix: if -> unless
This commit is contained in:
parent
10645196d1
commit
88e38eab7a
|
@ -78,8 +78,8 @@ module Knot::Protocol::Idx
|
||||||
attr_reader :name, :code, :cname, :description
|
attr_reader :name, :code, :cname, :description
|
||||||
|
|
||||||
def initialize name, code, cname, description
|
def initialize name, code, cname, description
|
||||||
raise ArgumentError, "Expecting Symbol for Idx::Id instead of: #{name.inspect}" if Symbol === name
|
raise ArgumentError, "Expecting Symbol for #{self.class.name} instead of: #{name.inspect}" unless Symbol === name
|
||||||
raise ArgumentError, "Expecting Integer for Idx::Id instead of: #{code.inspect}" if Integer === code
|
raise ArgumentError, "Expecting Integer for #{self.class.name} instead of: #{code.inspect}" unless Integer === code
|
||||||
@name, @code, @cname, @description = name, code, cname, description
|
@name, @code, @cname, @description = name, code, cname, description
|
||||||
freeze
|
freeze
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue