Sha256: dcb03a017482444d3c5eb09323370436601c82a57c0d5a71fd29680095b77624

Contents?: true

Size: 307 Bytes

Versions: 2

Compression:

Stored size: 307 Bytes

Contents

require_relative 'assertion'

# Comparison assertion for #kind_of?
#
#   KindAssay.pass?(1, Integer)  #=> true
#   KindAssay.fail?(1, String)   #=> true
#
class KindAssay < Assertion

  register :kind_of

  # Check assertion.
  def self.pass?(object, class_type)
    object.kind_of?(class_type)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
assay-0.4.1 lib/assay/kind_assay.rb
assay-0.4.0 lib/assay/kind_assay.rb