Class: Spectus::Challenge
- Inherits:
-
Object
- Object
- Spectus::Challenge
- Defined in:
- lib/spectus/challenge.rb
Overview
This class contains a challenge to apply against an object.
Instance Attribute Summary collapse
-
#args ⇒ Array
readonly
The parameters following the method.
-
#symbol ⇒ Symbol
readonly
The method to call on the subject.
Instance Method Summary collapse
-
#initialize(method_id, *args) ⇒ Challenge
constructor
Initialize the challenge class.
Constructor Details
#initialize(method_id, *args) ⇒ Challenge
Initialize the challenge class.
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
#args ⇒ Array (readonly)
Returns The parameters following the method.
24 25 26 |
# File 'lib/spectus/challenge.rb', line 24 def args @args end |
#symbol ⇒ Symbol (readonly)
Returns The method to call on the subject.
19 20 21 |
# File 'lib/spectus/challenge.rb', line 19 def symbol @symbol end |