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.
Implements requirement levels as defined in RFC 2119. Provides methods for specifying different levels of requirements in test specifications: MUST, SHOULD, and MAY.
Instance Method Summary collapse
-
#MAY(matcher) ⇒ ::Spectus::Requirement::Optional
This method means that the item is truly optional.
-
#MUST(matcher) ⇒ ::Spectus::Requirement::Required
This method means that the definition is an absolute requirement of the specification.
-
#MUST_NOT(matcher) ⇒ ::Spectus::Requirement::Required
This method means that the definition is an absolute prohibition of the specification.
-
#SHOULD(matcher) ⇒ ::Spectus::Requirement::Recommended
This method means that there may exist valid reasons in particular circumstances to ignore this requirement, but the implications must be understood and carefully weighed.
-
#SHOULD_NOT(matcher) ⇒ ::Spectus::Requirement::Recommended
This method means that there may exist valid reasons in particular circumstances when the behavior is acceptable, but the implications should be understood and weighed carefully.
Instance Method Details
#MAY(matcher) ⇒ ::Spectus::Requirement::Optional
This method means that the item is truly optional. Implementations may include this feature if it enhances their product, and must be prepared to interoperate with implementations that include or omit this feature.
113 114 115 |
# File 'lib/fix/requirement.rb', line 113 def MAY(matcher) ::Spectus::Requirement::Optional.new(negate: false, matcher:) end |
#MUST(matcher) ⇒ ::Spectus::Requirement::Required
This method means that the definition is an absolute requirement of the specification.
32 33 34 |
# File 'lib/fix/requirement.rb', line 32 def MUST(matcher) ::Spectus::Requirement::Required.new(negate: false, matcher:) end |
#MUST_NOT(matcher) ⇒ ::Spectus::Requirement::Required
This method means that the definition is an absolute prohibition of the specification.
52 53 54 |
# File 'lib/fix/requirement.rb', line 52 def MUST_NOT(matcher) ::Spectus::Requirement::Required.new(negate: true, matcher:) end |
#SHOULD(matcher) ⇒ ::Spectus::Requirement::Recommended
This method means that there may exist valid reasons in particular circumstances to ignore this requirement, but the implications must be understood and carefully weighed.
73 74 75 |
# File 'lib/fix/requirement.rb', line 73 def SHOULD(matcher) ::Spectus::Requirement::Recommended.new(negate: false, matcher:) end |
#SHOULD_NOT(matcher) ⇒ ::Spectus::Requirement::Recommended
This method means that there may exist valid reasons in particular circumstances when the behavior is acceptable, but the implications should be understood and weighed carefully.
92 93 94 |
# File 'lib/fix/requirement.rb', line 92 def SHOULD_NOT(matcher) ::Spectus::Requirement::Recommended.new(negate: true, matcher:) end |