Class: Fix::Sandbox Private

Inherits:
Object
  • Object
show all
Defined in:
lib/fix/sandbox.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.

Execute the untested code from the passed challenges.

Instance Method Summary collapse

Constructor Details

#initialize(object, *challenges) ⇒ Sandbox

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

Initialize the sandbox class.

Parameters:

  • object (BasicObject)

    The front object of the test.

  • challenges (Array)

    The list of challenges to apply.



11
12
13
14
# File 'lib/fix/sandbox.rb', line 11

def initialize(object, *challenges)
  @object     = object
  @challenges = challenges
end

Instance Method Details

#actualBasicObject

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

The actual value.

Returns:

  • (BasicObject)

    The actual value.



19
20
21
22
23
# File 'lib/fix/sandbox.rb', line 19

def actual
  @challenges.inject(@object) do |subject, challenge|
    subject.public_send(challenge.symbol, *challenge.args)
  end
end