Class: Aws::Resources::Documenter::DataOperationDocumenter
Instance Attribute Summary
#api_request, #api_request_name, #api_request_params, #builder, #called_operation, #operation_name, #resource_class, #resource_class_name, #source, #target_resource_class, #target_resource_class_name, #yard_class
Instance Method Summary
collapse
#initialize, #method_object
Instance Method Details
#data_members ⇒ Object
24
25
26
|
# File 'lib/aws-sdk-resources/documenter/data_operation_documenter.rb', line 24
def data_members
"\n" + path_shape.member_names.map{ |n| "\n* `#{n}`" }.join("\n")
end
|
#docstring ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/aws-sdk-resources/documenter/data_operation_documenter.rb', line 6
def docstring
if plural?
super + " Calls {#{called_operation}}, returning an array of {#{path_type}} objects."
else
super + " Calls {#{called_operation}}, returning a #{return_type.first}."
end
end
|
#plural? ⇒ Boolean
36
37
38
|
# File 'lib/aws-sdk-resources/documenter/data_operation_documenter.rb', line 36
def plural?
!!@operation.path.match(/\[/)
end
|
#return_message ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/aws-sdk-resources/documenter/data_operation_documenter.rb', line 14
def return_message
if plural? && structure?
"an array of {Structure structures} with the following memers:\n" + data_members
elsif structure?
"a {Structure} with the following members:\n" + data_members
else
''
end
end
|
#return_type ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/aws-sdk-resources/documenter/data_operation_documenter.rb', line 28
def return_type
if plural?
["Array<#{path_type}>"]
else
[path_type]
end
end
|
#structure? ⇒ Boolean
40
41
42
|
# File 'lib/aws-sdk-resources/documenter/data_operation_documenter.rb', line 40
def structure?
Seahorse::Model::Shapes::Structure === path_shape
end
|