Class: Evertils::Helper::Results
- Inherits:
-
Object
- Object
- Evertils::Helper::Results
- Defined in:
- lib/evertils/helpers/results.rb
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
Instance Method Summary collapse
-
#add(result) ⇒ Object
Add a result for processing.
-
#initialize ⇒ Results
constructor
A new instance of Results.
- #should_eval_to(pass_value) ⇒ Object
Constructor Details
#initialize ⇒ Results
Returns a new instance of Results.
5 6 7 8 |
# File 'lib/evertils/helpers/results.rb', line 5 def initialize @bucket = [] @bucket end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
4 5 6 |
# File 'lib/evertils/helpers/results.rb', line 4 def bucket @bucket end |
Instance Method Details
#add(result) ⇒ Object
Add a result for processing
11 12 13 14 |
# File 'lib/evertils/helpers/results.rb', line 11 def add(result) @bucket.push(result.to_bool) result.to_bool end |
#should_eval_to(pass_value) ⇒ Object
16 17 18 |
# File 'lib/evertils/helpers/results.rb', line 16 def should_eval_to(pass_value) @bucket.all? == pass_value end |