Class: WSDL::Contract::MessageContract
- Inherits:
-
Object
- Object
- WSDL::Contract::MessageContract
- Defined in:
- lib/wsdl/contract/message_contract.rb
Overview
Immutable request/response message contract.
Instance Attribute Summary collapse
- #body ⇒ PartContract readonly
- #header ⇒ PartContract readonly
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(header:, body:) ⇒ MessageContract
constructor
A new instance of MessageContract.
Constructor Details
#initialize(header:, body:) ⇒ MessageContract
Returns a new instance of MessageContract.
9 10 11 12 13 |
# File 'lib/wsdl/contract/message_contract.rb', line 9 def initialize(header:, body:) @header = header @body = body freeze end |
Instance Attribute Details
#body ⇒ PartContract (readonly)
19 20 21 |
# File 'lib/wsdl/contract/message_contract.rb', line 19 def body @body end |
#header ⇒ PartContract (readonly)
16 17 18 |
# File 'lib/wsdl/contract/message_contract.rb', line 16 def header @header end |
Instance Method Details
#empty? ⇒ Boolean
22 23 24 |
# File 'lib/wsdl/contract/message_contract.rb', line 22 def empty? @header.paths.empty? && @body.paths.empty? end |