Class: WsdlMapper::SvcGeneration::DocumentedOperationGenerator

Inherits:
OperationGenerator show all
Defined in:
lib/wsdl_mapper/svc_generation/documented_operation_generator.rb

Instance Method Summary (collapse)

Methods inherited from OperationGenerator

#generate_body, #generate_body_class, #generate_header, #generate_header_class, #generate_op_class, #generate_op_ctr, #generate_op_input_body, #generate_op_input_header, #generate_op_output_body, #generate_op_output_header, #generate_operation, #get_op_requires

Methods inherited from GeneratorBase

#initialize

Methods inherited from Generation::Base

#append_file_for, #file, #file_for, #generate_name, #get_formatter, #get_module_names, #get_type_name, #initialize, #type_file_for

Constructor Details

This class inherits a constructor from WsdlMapper::SvcGeneration::GeneratorBase

Instance Method Details

- (Object) generate_accessors(f, parts)



78
79
80
81
82
83
84
85
86
87
88
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 78

def generate_accessors(f, parts)
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  parts.each do |p|
    attr_name = p.property_name.attr_name
    type = @generator.get_ruby_type_name p.type

    yard.attribute! attr_name, type, '' do
    end
    f.attr_accessors attr_name
  end
end

- (Object) generate_ctr(f, parts)



90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 90

def generate_ctr(f, parts)
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  f.blank_line
  params = parts.map do |p|
    attr_name = p.property_name.attr_name
    type = @generator.get_ruby_type_name p.type

    [attr_name, type, '']
  end
  yard.params *params
  super
end

- (Object) generate_header_accessors(f, parts)



7
8
9
10
11
12
13
14
15
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 7

def generate_header_accessors(f, parts)
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  parts.each do |p|
    attr_name = p.property_name.attr_name
    type = p.name.name
    yard.attribute! attr_name, type, nil
    f.attr_accessors p.property_name.attr_name
  end
end

- (Object) generate_input_d10r(f, service, port, op)



60
61
62
63
64
65
66
67
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 60

def generate_input_d10r(f, service, port, op)
  f.blank_line
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  name = service_namer.get_input_d10r_name(service.type, port.type, op.type).name
  yard.type_tag :return, name, 'The input deserializer'
  yard.blank_line
  super
end

- (Object) generate_input_s8r(f, service, port, op)



35
36
37
38
39
40
41
42
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 35

def generate_input_s8r(f, service, port, op)
  f.blank_line
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  name = service_namer.get_input_s8r_name(service.type, port.type, op.type).name
  yard.type_tag :return, name, 'The input serializer'
  yard.blank_line
  super
end

- (Object) generate_new_documentation(body_name, header_name, yard)



44
45
46
47
48
49
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 44

def generate_new_documentation(body_name, header_name, yard)
  yard.params [:header, '::Hash', "Keyword arguments for {#{header_name.name}.new}"],
   [:body, '::Hash', "Keyword arguments for {#{body_name.name}.new}"]
  yard.type_tag :return, @generator.runtime_base('Message', 'message').name, 'A new SOAP message'
  yard.blank_line
end

- (Object) generate_new_input(f, service, port, op)



17
18
19
20
21
22
23
24
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 17

def generate_new_input(f, service, port, op)
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  header_name = service_namer.get_input_header_name(service.type, port.type, op.type)
  body_name = service_namer.get_input_body_name(service.type, port.type, op.type)
  f.blank_line
  generate_new_documentation body_name, header_name, yard
  super
end

- (Object) generate_new_output(f, service, port, op)



26
27
28
29
30
31
32
33
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 26

def generate_new_output(f, service, port, op)
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  header_name = service_namer.get_output_header_name(service.type, port.type, op.type)
  body_name = service_namer.get_output_body_name(service.type, port.type, op.type)
  f.blank_line
  generate_new_documentation body_name, header_name, yard
  super
end

- (Object) generate_output_d10r(f, service, port, op)



69
70
71
72
73
74
75
76
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 69

def generate_output_d10r(f, service, port, op)
  f.blank_line
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  name = service_namer.get_output_d10r_name(service.type, port.type, op.type).name
  yard.type_tag :return, name, 'The output deserializer'
  yard.blank_line
  super
end

- (Object) generate_output_s8r(f, service, port, op)



51
52
53
54
55
56
57
58
# File 'lib/wsdl_mapper/svc_generation/documented_operation_generator.rb', line 51

def generate_output_s8r(f, service, port, op)
  f.blank_line
  yard = WsdlMapper::Generation::YardDocFormatter.new f
  name = service_namer.get_output_s8r_name(service.type, port.type, op.type).name
  yard.type_tag :return, name, 'The output serializer'
  yard.blank_line
  super
end