Class: Evertils::Helper::Results

Inherits:
Object
  • Object
show all
Defined in:
lib/evertils/helpers/results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResults

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

#bucketObject (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