Class: CabezaDeTermo::JsonSpec::ExpectationMessagesMapping
- Inherits:
-
Object
- Object
- CabezaDeTermo::JsonSpec::ExpectationMessagesMapping
- Defined in:
- lib/cabeza-de-termo/json-spec/expectations-library/messages/expectation-messages-mapping.rb
Instance Method Summary collapse
- #define_message_formatter_for(expectation_method, message_block) ⇒ Object
- #has_message_formatter_for?(expectation_method) ⇒ Boolean
-
#initialize ⇒ ExpectationMessagesMapping
constructor
A new instance of ExpectationMessagesMapping.
- #message_formatter_for(expectation_method) ⇒ Object
- #messages ⇒ Object
Constructor Details
#initialize ⇒ ExpectationMessagesMapping
Returns a new instance of ExpectationMessagesMapping.
4 5 6 |
# File 'lib/cabeza-de-termo/json-spec/expectations-library/messages/expectation-messages-mapping.rb', line 4 def initialize() @messages = {} end |
Instance Method Details
#define_message_formatter_for(expectation_method, message_block) ⇒ Object
20 21 22 23 24 |
# File 'lib/cabeza-de-termo/json-spec/expectations-library/messages/expectation-messages-mapping.rb', line 20 def (expectation_method, ) [expectation_method.to_sym] = self end |
#has_message_formatter_for?(expectation_method) ⇒ Boolean
16 17 18 |
# File 'lib/cabeza-de-termo/json-spec/expectations-library/messages/expectation-messages-mapping.rb', line 16 def (expectation_method) .key?(expectation_method.to_sym) end |
#message_formatter_for(expectation_method) ⇒ Object
12 13 14 |
# File 'lib/cabeza-de-termo/json-spec/expectations-library/messages/expectation-messages-mapping.rb', line 12 def (expectation_method) [expectation_method.to_sym] end |
#messages ⇒ Object
8 9 10 |
# File 'lib/cabeza-de-termo/json-spec/expectations-library/messages/expectation-messages-mapping.rb', line 8 def @messages end |