Module: Fix::Requirement Private
- Included in:
- Dsl
- Defined in:
- lib/fix/requirement.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Collection of expectation matchers.
Instance Method Summary collapse
-
#MAY(matcher) ⇒ Requirement::Optional
This method mean that an item is truly optional.
- #MAY!(matcher) ⇒ Object
-
#MUST(matcher) ⇒ Requirement::Required
This method mean that the definition is an absolute requirement of the specification.
- #MUST!(matcher) ⇒ Object
-
#MUST_NOT(matcher) ⇒ Requirement::Required
This method mean that the definition is an absolute prohibition of the specification.
- #MUST_NOT!(matcher) ⇒ Object
-
#SHOULD(matcher) ⇒ Requirement::Recommended
This method mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.
- #SHOULD!(matcher) ⇒ Object
-
#SHOULD_NOT(matcher) ⇒ Requirement::Recommended
This method mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.
- #SHOULD_NOT!(matcher) ⇒ Object
Instance Method Details
#MAY(matcher) ⇒ Requirement::Optional
This method mean that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option must be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option must be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides).
141 142 143 144 145 146 147 |
# File 'lib/fix/requirement.rb', line 141 def MAY(matcher) ::Spectus::Requirement::Optional.new( isolate: false, negate: false, matcher: matcher ) end |
#MAY!(matcher) ⇒ Object
152 153 154 155 156 157 158 |
# File 'lib/fix/requirement.rb', line 152 def MAY!(matcher) ::Spectus::Requirement::Optional.new( isolate: true, negate: false, matcher: matcher ) end |
#MUST(matcher) ⇒ Requirement::Required
This method mean that the definition is an absolute requirement of the specification.
22 23 24 25 26 27 28 |
# File 'lib/fix/requirement.rb', line 22 def MUST(matcher) ::Spectus::Requirement::Required.new( isolate: false, negate: false, matcher: matcher ) end |
#MUST!(matcher) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/fix/requirement.rb', line 33 def MUST!(matcher) ::Spectus::Requirement::Required.new( isolate: true, negate: false, matcher: matcher ) end |
#MUST_NOT(matcher) ⇒ Requirement::Required
This method mean that the definition is an absolute prohibition of the specification.
48 49 50 51 52 53 54 |
# File 'lib/fix/requirement.rb', line 48 def MUST_NOT(matcher) ::Spectus::Requirement::Required.new( isolate: false, negate: true, matcher: matcher ) end |
#MUST_NOT!(matcher) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/fix/requirement.rb', line 59 def MUST_NOT!(matcher) ::Spectus::Requirement::Required.new( isolate: true, negate: true, matcher: matcher ) end |
#SHOULD(matcher) ⇒ Requirement::Recommended
This method mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.
76 77 78 79 80 81 82 |
# File 'lib/fix/requirement.rb', line 76 def SHOULD(matcher) ::Spectus::Requirement::Recommended.new( isolate: false, negate: false, matcher: matcher ) end |
#SHOULD!(matcher) ⇒ Object
87 88 89 90 91 92 93 |
# File 'lib/fix/requirement.rb', line 87 def SHOULD!(matcher) ::Spectus::Requirement::Recommended.new( isolate: true, negate: false, matcher: matcher ) end |
#SHOULD_NOT(matcher) ⇒ Requirement::Recommended
This method mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label.
106 107 108 109 110 111 112 |
# File 'lib/fix/requirement.rb', line 106 def SHOULD_NOT(matcher) ::Spectus::Requirement::Recommended.new( isolate: false, negate: true, matcher: matcher ) end |
#SHOULD_NOT!(matcher) ⇒ Object
117 118 119 120 121 122 123 |
# File 'lib/fix/requirement.rb', line 117 def SHOULD_NOT!(matcher) ::Spectus::Requirement::Recommended.new( isolate: true, negate: true, matcher: matcher ) end |