A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/sdkforruby/api/Aws/Resources/Documenter/HasOperationDocumenter.html below:

HasOperationDocumenter — AWS SDK for Ruby V2

You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Resources::Documenter::HasOperationDocumenter Attribute Summary collapse Instance Attribute Summary Attributes inherited from BaseOperationDocumenter

#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 Methods inherited from BaseOperationDocumenter

#initialize, #method_object

Instance Method Details #argument? ⇒ Boolean
41
42
43
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 41

def argument?
  @operation.arity > 0
end
#argument_name(argument) ⇒ Object
59
60
61
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 59

def argument_name(argument)
  argument.target.to_s
end
#arguments ⇒ Object
53
54
55
56
57
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 53

def arguments
  builder.sources.select do |source|
    BuilderSources::Argument === source
  end
end
#can_return_nil? ⇒ Boolean
45
46
47
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 45

def can_return_nil?
  data_member
end
#data_member ⇒ Object
49
50
51
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 49

def data_member
  builder.sources.find { |s| BuilderSources::DataMember === s }
end
#parameters ⇒ Object
16
17
18
19
20
21
22
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 16

def parameters
  if argument?
    arguments.map { |arg| [argument_name(arg), nil] }
  else
    []
  end
end
#plural? ⇒ Boolean
37
38
39
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 37

def plural?
  @operation.builder.plural?
end
#return_tag ⇒ Object
6
7
8
9
10
11
12
13
14
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 6

def return_tag
  if plural?
    type = "Array<#{target_resource_class_name}>"
  else
    type = target_resource_class_name
  end
  type += ',nil' if can_return_nil?
  tag("@return [#{type}]")
end
#tags ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
# File 'aws-sdk-resources/lib/aws-sdk-resources/documenter/has_operation_documenter.rb', line 24

def tags
  tags = super
  if argument?
    arguments.each do |arg|
      tag = "@param [String] #{argument_name(arg)} "
      tag << "The {#{target_resource_class_name}##{argument_name(arg)}} "
      tag << "identifier."
      tags += YARD::DocstringParser.new.parse(tag).to_docstring.tags
    end
  end
  tags
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4