# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 45 def batch_examples_tag example = "@example Batch operations callable on the returned collection" target_resource_batch_operations.each do |name| example << "\n #{variable_name}.#{@operation_name}.#{name}" end tag(example) end
# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 6 def docstring super + ' ' +"Returns a {Resources::Collection Collection} of {#{target_resource_class_name}} resources. No API requests are made until you call an enumerable method on the collection. {#{called_operation}} will be called multiple times until every {#{target_resource_class_name}} has been yielded. ".lstrip end
# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 27 def enumerate_example_tag tag("@example Enumerating {#{target_resource_class_name}} resources. #{variable_name}.#{@operation_name}.each do |#{target_resource_class_name.downcase}| # yields each #{target_resource_class_name.downcase} end ".strip) end
# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 36 def enumerate_with_limit_example_tag tag("@example Enumerating {#{target_resource_class_name}} resources with a limit. #{variable_name}.#{@operation_name}.limit(10).each do |#{target_resource_class_name.downcase}| # yields at most 10 #{@operation_name} end ".strip) end
# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 15 def return_tag tag("@return [Collection<#{target_resource_class_name}>]") end
# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 58 def target_resource_batch_operations target_resource_class::Batch.operation_names end
# File lib/aws-sdk-resources/documenter/has_many_operation_documenter.rb, line 53 def target_resource_batches? target_resource_class.const_defined?(:Batch) && target_resource_batch_operations.count > 0 end