Class: Aws::Api::Docs::SharedExample Private

Inherits:
Object
  • Object
show all
Includes:
Utils, Seahorse::Model::Shapes
Defined in:
lib/aws-sdk-core/api/docs/shared_example.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods included from Utils

#compute_recursive_shapes, #document_struct_member, #input_type, #operation_input_ref, #output_type, #struct_member_docstring, #summary, #tag

Constructor Details

#initialize(params, method_name, operation, comments) ⇒ SharedExample

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SharedExample.



9
10
11
12
13
14
15
# File 'lib/aws-sdk-core/api/docs/shared_example.rb', line 9

def initialize(params, method_name, operation, comments)
  @params = params
  @method_name = method_name
  @operation = operation
  @comments = comments
  @params ||= {}
end

Instance Method Details

#to_str_inputObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
20
21
# File 'lib/aws-sdk-core/api/docs/shared_example.rb', line 17

def to_str_input
  lines = structure(@params, @operation.input, "", [])
  params = lines.join("\n")
  "resp = client.#{@method_name}(#{params})"
end

#to_str_outputObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
26
27
# File 'lib/aws-sdk-core/api/docs/shared_example.rb', line 23

def to_str_output
  lines = structure(@params, @operation.output, "", [])
  params = lines.join("\n")
  "#{params}"
end