Class: Fix::On Private

Inherits:
Object
  • Object
show all
Defined in:
lib/fix/let.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Open the on class.

Instance Method Summary collapse

Instance Method Details

#let(method_name, &block) ⇒ #object_id

Returns List of results.

Examples:

Let’s define the answer to the Ultimate Question of Life, the

Universe, and Everything.

let(:answer) { 42 }

Parameters:

  • method_name (Symbol)

    The identifier of a method.

  • block (Proc)

    A spec to compare against the computed value.

Returns:

  • (#object_id)

    List of results.



26
27
28
# File 'lib/fix/let.rb', line 26

def let(method_name, &block)
  helpers.update(method_name => block)
end