Class: TheArrayComparator::Check

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/the_array_comparator/check.rb

Overview

the check

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strategy_klass, sample) ⇒ Check

Creates new check



17
18
19
20
# File 'lib/the_array_comparator/check.rb', line 17

def initialize(strategy_klass,sample)
  @check = strategy_klass.new(sample)
  @sample = sample
end

Instance Attribute Details

#sampleObject (readonly)

Returns the value of attribute sample.



14
15
16
# File 'lib/the_array_comparator/check.rb', line 14

def sample
  @sample
end

Instance Method Details

#success?Boolean

Checks for success



23
24
25
# File 'lib/the_array_comparator/check.rb', line 23

def success?
  @check.success?
end