Class: LolSoap::WSDL::OperationIOPart

Inherits:
Element
  • Object
show all
Defined in:
lib/lolsoap/wsdl/operation_io_part.rb

Instance Attribute Summary

Attributes inherited from Element

#name, #prefix, #type_reference

Instance Method Summary collapse

Methods inherited from Element

#inspect, #prefix_and_name, #singular?, #type

Constructor Details

#initialize(wsdl, name, type_reference) ⇒ OperationIOPart

Returns a new instance of OperationIOPart.



3
4
5
# File 'lib/lolsoap/wsdl/operation_io_part.rb', line 3

def initialize(wsdl, name, type_reference)
  super(wsdl, name, 'soap', type_reference)
end

Instance Method Details

#contentObject



11
12
13
14
15
# File 'lib/lolsoap/wsdl/operation_io_part.rb', line 11

def content
  if single_part?
    type.element(type.elements.keys.first)
  end
end

#content_typeObject



17
18
19
20
21
22
23
# File 'lib/lolsoap/wsdl/operation_io_part.rb', line 17

def content_type
  if content
    content.type
  else
    type
  end
end

#single_part?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/lolsoap/wsdl/operation_io_part.rb', line 7

def single_part?
  type.elements.size == 1
end