Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Commit

Permalink
Fixed a few documentation issues with the restructuring of gem files.
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorrowe committed Sep 19, 2014
1 parent ef9ae46 commit 044a88e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion aws-sdk-resources/lib/aws-sdk-resources/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def limit_key
def reject_limit_param(options)
if options[:params] && options[:params][limit_key]
msg = "invalid option :#{limit_key}, call #limit or #batch_size "
msg << "on the returned Aws::Resource::Collection instead"
msg << "on the returned Aws::Resources::Collection instead"
raise ArgumentError, msg
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def initialize(yard_class, resource_class, operation_name, operation)
# any API requests.
attr_reader :api_request

# @return [Array<Resource::RequestParams::Base>, nil] Returns the
# @return [Array<Resources::RequestParams::Base>, nil] Returns the
# parameters this operation binds to the made request. Returns `nil`
# if this operation does not make a request.
attr_reader :api_request_params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class EnumerateResourceOperationDocumenter < BaseOperationDocumenter

def docstring
super + ' ' +<<-DOCSTRING.lstrip
Returns a {Resource::Collection Collection} of {#{target_resource_class_name}}
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.
Expand All @@ -17,7 +17,7 @@ def return_type
end

def return_message
"a {Aws::Resource::Collection Collection} of {#{target_resource_class_name}} resource objects."
"a {Aws::Resources::Collection Collection} of {#{target_resource_class_name}} resource objects."
end

def example_tags
Expand Down
10 changes: 5 additions & 5 deletions doc-src/plugins/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# KNOWN ISSUES
#
# - Changed Resource::Base#data, #client and #attributes from
# - Changed Resource#data, #client and #attributes from
# attr_reader to methods so I could override them in the client
# with the appropriate return values
#
Expand Down Expand Up @@ -46,7 +46,7 @@ def apply
namespace = YARD::Registry[svc_module.name]
svc_module.constants.each do |const|
klass = svc_module.const_get(const)
if klass.ancestors.include?(Aws::Resource::Base)
if klass.ancestors.include?(Aws::Resources::Resource)
yard_class = document_resource_class(const, namespace, klass)
if const == :Resource
yard_class.docstring = service_docstring(const, yard_class, klass)
Expand Down Expand Up @@ -84,9 +84,9 @@ def service_docstring(name, yard_class, svc_class)

def document_resource_class(name, namespace, resource_class)
yard_class = YARD::CodeObjects::ClassObject.new(namespace, name)
yard_class.superclass = YARD::Registry['Aws::Resource::Base']
yard_class.superclass = YARD::Registry['Aws::Resources::Resource']
document_constructor(yard_class, resource_class)
# intentionally disabled as these are documented in Aws::Resource::Base
# intentionally disabled as these are documented in Aws::Resources::Resource
#document_client_getter(yard_class, resource_class)
#document_identifiers_hash(yard_class, resource_class)
#document_load(yard_class, resource_class)
Expand Down Expand Up @@ -212,7 +212,7 @@ def document_operation_methods(yard_class, resource_class)

def document_operation_method(yard_class, resource_class, name, operation)
type = operation.class.name.split('::').last
documenter = Aws::Resource::Documenter.const_get(type + 'Documenter')
documenter = Aws::Resources::Documenter.const_get(type + 'Documenter')
documenter = documenter.new(yard_class, resource_class, name, operation)
documenter.method_object
end
Expand Down

0 comments on commit 044a88e

Please sign in to comment.