Class: CabezaDeTermo::JsonSpec::CanBeAbsentExpectationsRunner
- Inherits:
-
AbstractExpectationsRunner
- Object
- AbstractExpectationsRunner
- CabezaDeTermo::JsonSpec::CanBeAbsentExpectationsRunner
- Defined in:
- lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-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.
-
#explain_with(expression_walker) ⇒ Object
Yes, this sucks.
-
#initialize(expectations_runner) ⇒ CanBeAbsentExpectationsRunner
constructor
A new instance of CanBeAbsentExpectationsRunner.
-
#underlaying_runner ⇒ Object
Accessing.
Constructor Details
#initialize(expectations_runner) ⇒ CanBeAbsentExpectationsRunner
Returns a new instance of CanBeAbsentExpectationsRunner.
7 8 9 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-expectations-runner.rb', line 7 def initialize(expectations_runner) @underlaying_runner = expectations_runner end |
Instance Method Details
#accept_walker(expression_walker) ⇒ Object
Walking
25 26 27 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-expectations-runner.rb', line 25 def accept_walker(expression_walker) expression_walker.walk_expectation_runner(self) end |
#accept_walker_with_value_holder(expression_walker, value_holder) ⇒ Object
29 30 31 32 33 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-expectations-runner.rb', line 29 def accept_walker_with_value_holder(expression_walker, value_holder) raise SkipBranchSignal.new if value_holder.is_missing_value? .accept_walker_with_value_holder(expression_walker, value_holder) end |
#add(expectation) ⇒ Object
Adding
19 20 21 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-expectations-runner.rb', line 19 def add(expectation) .add(expectation) end |
#explain_with(expression_walker) ⇒ Object
Yes, this sucks. But I got kind of tired of this library and want to move on to something else.
39 40 41 42 43 44 45 46 47 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-expectations-runner.rb', line 39 def explain_with(expression_walker) expression_walker.during_tab do expression_walker.append_in_new_line('if present') expression_walker.cr expression_walker.append_tabs .explain_with(expression_walker) end end |
#underlaying_runner ⇒ Object
Accessing
13 14 15 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-absent-expectations-runner.rb', line 13 def @underlaying_runner end |