Class: Spectus::Challenge Private

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

This class evaluate the expectation with the passed block.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_id, *args) ⇒ Challenge

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.

A Query to the subject.

Parameters:

  • method_id (#to_sym)

    the identifier of a method.

  • args (Array)

    the arguments of the method.



11
12
13
14
# File 'lib/spectus/challenge.rb', line 11

def initialize(method_id, *args)
  @symbol = method_id.to_sym
  @args   = args
end

Instance Attribute Details

#argsArray (readonly)

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.

Returns the parameters following the method.

Returns:

  • (Array)

    the parameters following the method.



20
21
22
# File 'lib/spectus/challenge.rb', line 20

def args
  @args
end

#symbolSymbol (readonly)

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.

Returns the method to call on the subject.

Returns:

  • (Symbol)

    the method to call on the subject.



17
18
19
# File 'lib/spectus/challenge.rb', line 17

def symbol
  @symbol
end