Class: Lookout::Object::Not

Inherits:
Object show all
Defined in:
lib/lookout-3.0/object/not.rb

Overview

The “not” keyword on Objects.

Defined Under Namespace

Classes: Receive

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Not

Wraps OBJECT as a “not”.

Parameters:



7
# File 'lib/lookout-3.0/object/not.rb', line 7

def initialize(object) @object = object end

Instance Method Details

#receiveReceive

Returns A wrapper around the object that’ll set up a reception expectation on it.

Returns:

  • (Receive)

    A wrapper around the object that’ll set up a reception expectation on it



15
# File 'lib/lookout-3.0/object/not.rb', line 15

def receive; Receive.new(@object) end

#toself

Method for improving readability of “not” keyword set-up.

Returns:

  • (self)


11
# File 'lib/lookout-3.0/object/not.rb', line 11

def to; self end