Module: Must

Defined in:
lib/must.rb,
lib/must/rule.rb,
lib/must/differ.rb,
lib/must/version.rb,
lib/must/struct_info.rb

Overview

Must

Defined Under Namespace

Classes: ClassMismatch, Differ, Invalid, Rule, StructInfo, StructMismatch, ValueMismatch

Constant Summary collapse

VERSION =
"0.3.0"

Instance Method Summary collapse

Instance Method Details

#must(*args, &block) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/must.rb', line 10

def must(*args, &block)
  if args.size > 0
    Rule.new(self).be.kind_of(*args, &block)
  else
    Rule.new(self)
  end
end