class Object

TODO: What about BasicObject ?

Public Instance Methods

assert(matcher=nil, *args, &blk) click to toggle source

Use ‘assert` nomenclature for assertions.

10.assert.kind_of?(Integer)
Calls superclass method
# File lib/fluidity/assert.rb, line 9
def assert(matcher=nil, *args, &blk)
  if matcher
    if matcher.respond_to?(:=~) # good enough ?
      matcher =~ self
    else
      super(matcher, *args, &blk)
    end
  else
    ::Fluidity::Grammer::Assert.new(self)
  end
end
is(matcher=nil) click to toggle source

Use ‘is` nomenclature for assertions.

10.is.kind_of?(Integer)
# File lib/fluidity/is.rb, line 9
def is(matcher=nil)
  if matcher
    matcher === self
  else
    ::Fluidity::Grammer::Is.new(self)
  end
end
must(matcher=nil) click to toggle source

Use ‘must` nomenclature for assertions.

10.must.be.kind_of(Integer)
# File lib/fluidity/must.rb, line 11
def must(matcher=nil)
  if matcher
    matcher =~ self
  else
    ::Fluidity::Grammer::Must.new(self)
  end
end
must_not(matcher=nil) click to toggle source

Also, ‘must_not` nomenclature for assertions.

10.must_not.be.kind_of?(Integer)
# File lib/fluidity/must.rb, line 23
def must_not(matcher=nil)
  if matcher
    matcher !~ self
  else
    ::Fluidity::Grammer::Must.new(self, true)
  end
end
Also aliased as: mustnt
mustnt(matcher=nil)

Contraction do must not.

10.mustnt.be.kind_of?(Integer)
Alias for: must_not
should(matcher=nil) click to toggle source

Use ‘should` nomenclature for assertions.

10.should.be.kind_of(Integer)
# File lib/fluidity/should.rb, line 9
def should(matcher=nil)
  if matcher
    matcher =~ self
  else
    ::Fluidity::Grammer::Should.new(self)
  end
end
should_not(matcher=nil) click to toggle source

Also, ‘should_not` nomenclature for assertions.

10.should_not.be.kind_of?(Integer)
# File lib/fluidity/should.rb, line 21
def should_not(matcher=nil)
  if matcher
    matcher !~ self
  else
    ::Fluidity::Grammer::Should.new(self, true)
  end
end
Also aliased as: shouldnt
shouldnt(matcher=nil)
Alias for: should_not
will(matcher=nil) click to toggle source

Use ‘will` nomenclature for assertions.

10.will.be.kind_of(Integer)
# File lib/fluidity/will.rb, line 9
def will(matcher=nil)
  if matcher
    matcher =~ self
  else
    ::Fluidity::Grammer::Must.new(self)
  end
end