Class: WSDL::Contract::OperationContract

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdl/contract/operation_contract.rb

Overview

Canonical contract/introspection surface for an operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation_info) ⇒ OperationContract



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/wsdl/contract/operation_contract.rb', line 8

def initialize(operation_info)
  @operation_info = operation_info
  @request = MessageContract.new(
    header: PartContract.new(@operation_info.input.header_parts, section: :header),
    body: PartContract.new(@operation_info.input.body_parts, section: :body)
  )
  @response = MessageContract.new(
    header: PartContract.new(@operation_info.output.header_parts, section: :header),
    body: PartContract.new(@operation_info.output.body_parts, section: :body)
  )
  freeze
end

Instance Attribute Details

#requestMessageContract (readonly)



22
23
24
# File 'lib/wsdl/contract/operation_contract.rb', line 22

def request
  @request
end

#responseMessageContract (readonly)



25
26
27
# File 'lib/wsdl/contract/operation_contract.rb', line 25

def response
  @response
end

Instance Method Details

#styleString



28
29
30
# File 'lib/wsdl/contract/operation_contract.rb', line 28

def style
  @operation_info.input_style
end