Class: CabezaDeTermo::JsonSpec::Expectation
- Inherits:
-
AbstractExpectation
- Object
- AbstractExpectation
- CabezaDeTermo::JsonSpec::Expectation
- Defined in:
- lib/cabeza-de-termo/json-spec/expectations/expectation.rb
Direct Known Subclasses
AllExpectationsComposite, AnyExpectationComposite, BlockExpectation, IsEmailExpectation, IsScalarExpectation, IsUrlExpectation, NegatedExpectation
Instance Method Summary collapse
-
#accept_walker(expression_walker) ⇒ Object
Walking.
- #expectation_method ⇒ Object
-
#explain ⇒ Object
Explaining.
- #explain_parameters ⇒ Object
- #failed_message_block ⇒ Object
-
#failed_message_on(value_holder) ⇒ Object
Message format.
- #json_spec ⇒ Object
- #set_expectation_method(expectation_method) ⇒ Object
-
#set_json_spec(json_spec) ⇒ Object
Accessing.
Methods inherited from AbstractExpectation
Instance Method Details
#accept_walker(expression_walker) ⇒ Object
Walking
36 37 38 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 36 def accept_walker(expression_walker) expression_walker.walk_expectation(self) end |
#expectation_method ⇒ Object
16 17 18 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 16 def expectation_method() @expectation_method end |
#explain ⇒ Object
Explaining
42 43 44 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 42 def explain() expectation_method.to_s + explain_parameters end |
#explain_parameters ⇒ Object
46 47 48 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 46 def explain_parameters() '()' end |
#failed_message_block ⇒ Object
30 31 32 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 30 def () json_spec.(expectation_method) end |
#failed_message_on(value_holder) ⇒ Object
Message format
26 27 28 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 26 def (value_holder) .(self, value_holder) end |
#json_spec ⇒ Object
12 13 14 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 12 def json_spec() @json_spec end |
#set_expectation_method(expectation_method) ⇒ Object
20 21 22 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 20 def set_expectation_method(expectation_method) @expectation_method = expectation_method end |
#set_json_spec(json_spec) ⇒ Object
Accessing
8 9 10 |
# File 'lib/cabeza-de-termo/json-spec/expectations/expectation.rb', line 8 def set_json_spec(json_spec) @json_spec = json_spec end |