Class: CabezaDeTermo::JsonSpec::CanBeNullExpectationsRunner
- Inherits:
-
AbstractExpectationsRunner
- Object
- AbstractExpectationsRunner
- CabezaDeTermo::JsonSpec::CanBeNullExpectationsRunner
- Defined in:
- lib/cabeza-de-termo/json-spec/expectations/runner/can-be-null-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
Explaining.
-
#initialize(expectations_runner) ⇒ CanBeNullExpectationsRunner
constructor
A new instance of CanBeNullExpectationsRunner.
-
#underlaying_runner ⇒ Object
Accessing.
Constructor Details
#initialize(expectations_runner) ⇒ CanBeNullExpectationsRunner
Returns a new instance of CanBeNullExpectationsRunner.
7 8 9 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-null-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-null-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-null-expectations-runner.rb', line 29 def accept_walker_with_value_holder(expression_walker, value_holder) raise SkipBranchSignal.new if value_holder.value.nil? .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-null-expectations-runner.rb', line 19 def add(expectation) .add(expectation) end |
#explain_with(expression_walker) ⇒ Object
Explaining
37 38 39 40 41 42 43 44 45 |
# File 'lib/cabeza-de-termo/json-spec/expectations/runner/can-be-null-expectations-runner.rb', line 37 def explain_with(expression_walker) expression_walker.during_tab do expression_walker.append_in_new_line('if not null') 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-null-expectations-runner.rb', line 13 def @underlaying_runner end |