Module Extlib::Assertions
In: lib/extlib/assertions.rb
Hash SimpleSet ::String ByteArray StandardError InvalidResourceError Logger Pool lib/extlib/logger.rb lib/extlib/byte_array.rb lib/extlib/simple_set.rb Inflection ClassMethods Hook Assertions lib/extlib/pooling.rb Pooling Extlib dot/m_30_0.png

Methods

Public Instance methods

[Source]

   # File lib/extlib/assertions.rb, line 3
3:     def assert_kind_of(name, value, *klasses)
4:       klasses.each { |k| return if value.kind_of?(k) }
5:       raise ArgumentError, "+#{name}+ should be #{klasses.map { |k| k.name } * ' or '}, but was #{value.class.name}", caller(2)
6:     end

[Validate]