Class: Aws::Api::OperationDocumenter Private
- Inherits:
-
Object
- Object
- Aws::Api::OperationDocumenter
- Defined in:
- lib/aws-sdk-core/api/operation_documenter.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
- #api_ref(shape) ⇒ Object private
- #clean(docs) ⇒ Object private
- #example ⇒ Object private
-
#initialize(options) ⇒ OperationDocumenter
constructor
private
A new instance of OperationDocumenter.
- #input ⇒ Object private
- #output ⇒ Object private
Constructor Details
#initialize(options) ⇒ OperationDocumenter
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 OperationDocumenter.
5 6 7 8 |
# File 'lib/aws-sdk-core/api/operation_documenter.rb', line 5 def initialize() @operation = [:operation] @example = OperationExample.new() end |
Instance Method Details
#api_ref(shape) ⇒ Object
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.
43 44 45 46 47 48 |
# File 'lib/aws-sdk-core/api/operation_documenter.rb', line 43 def api_ref(shape) docs = shape.nil? ? '' : shape.documentation if docs && !docs.empty? "<div class=\"api-ref\">#{clean(docs)}</div>" end end |
#clean(docs) ⇒ Object
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.
34 35 36 37 38 39 40 41 |
# File 'lib/aws-sdk-core/api/operation_documenter.rb', line 34 def clean(docs) docs = docs.gsub(/<!--.*?-->/m, '') docs = docs.gsub(/<examples?>.+?<\/examples?>/m, '') docs = docs.gsub(/<\/?note>/m, '') docs = docs.gsub(/\{(\S+)\}/, '`{\1}`') docs = docs.gsub(/\s+/, ' ').strip docs end |
#example ⇒ Object
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.
30 31 32 |
# File 'lib/aws-sdk-core/api/operation_documenter.rb', line 30 def example @example end |
#input ⇒ Object
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.
10 11 12 13 14 15 16 17 18 |
# File 'lib/aws-sdk-core/api/operation_documenter.rb', line 10 def input params(nil) do if @operation.input structure(@operation.input, []) else [] end end.join end |
#output ⇒ Object
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.
20 21 22 23 24 25 26 27 28 |
# File 'lib/aws-sdk-core/api/operation_documenter.rb', line 20 def output params(nil) do if @operation.output structure(@operation.output, []) else [] end end.join end |