Class: CabezaDeTermo::JsonSpec::ExpectationsRunner
- Inherits:
-
AbstractExpectationsRunner
- Object
- AbstractExpectationsRunner
- CabezaDeTermo::JsonSpec::ExpectationsRunner
- Defined in:
- lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb
Instance Method Summary collapse
-
#accept_walker(expression_walker) ⇒ Object
Walking.
- #accept_walker_with_value_holder(expression_walker, value_holder) ⇒ Object
-
#add(expectation) ⇒ Object
Adding.
-
#expectations ⇒ Object
Accessing.
-
#explain_with(expression_walker) ⇒ Object
Explaining.
-
#initialize ⇒ ExpectationsRunner
constructor
A new instance of ExpectationsRunner.
Constructor Details
#initialize ⇒ ExpectationsRunner
Returns a new instance of ExpectationsRunner.
6 7 8 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb', line 6 def initialize() @expectations = [] end |
Instance Method Details
#accept_walker(expression_walker) ⇒ Object
Walking
24 25 26 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb', line 24 def accept_walker(expression_walker) expression_walker.walk_expectation_runner(self) end |
#accept_walker_with_value_holder(expression_walker, value_holder) ⇒ Object
28 29 30 31 32 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb', line 28 def accept_walker_with_value_holder(expression_walker, value_holder) expectations.each do |each_expectation| each_expectation.accept_walker(expression_walker) end end |
#add(expectation) ⇒ Object
Adding
12 13 14 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb', line 12 def add(expectation) @expectations << expectation end |
#expectations ⇒ Object
Accessing
18 19 20 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb', line 18 def expectations @expectations end |
#explain_with(expression_walker) ⇒ Object
Explaining
36 37 38 39 40 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/expectations-runner.rb', line 36 def explain_with(expression_walker) expectations.each do |each_expectation| expression_walker.walk_expectation(each_expectation) end end |