Class: Awspec::Generator::Doc::Type::AccountAttributeBase
- Defined in:
- lib/awspec/generator/doc/type/account_attribute_base.rb
Direct Known Subclasses
Ec2AccountAttributes, LambdaAccountSettings, RdsAccountAttributes, SesSendQuota
Instance Method Summary collapse
- #doc_template ⇒ Object
-
#initialize ⇒ AccountAttributeBase
constructor
A new instance of AccountAttributeBase.
Methods inherited from Base
#collect_matchers, #generate_doc, #sort_num, #type_name
Constructor Details
#initialize ⇒ AccountAttributeBase
Returns a new instance of AccountAttributeBase.
7 8 9 10 |
# File 'lib/awspec/generator/doc/type/account_attribute_base.rb', line 7 def initialize Awspec::Stub.load 'account' @type_name = type_name end |
Instance Method Details
#doc_template ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/awspec/generator/doc/type/account_attribute_base.rb', line 12 def doc_template "## <a name=\"<%= @type_name.gsub(/ /, '_').underscore %>\"><%= @type_name.gsub(/ /, '_').underscore %></a>\n\n<%= @type_name %> account attributes.\n<%- if @descriptions.include?('first') -%><%= @descriptions['first'] %><%- end -%>\n<% @matchers.each do |matcher| %>\n### <%= matcher %>\n<%- if @descriptions.include?(matcher) -%><%= @descriptions[matcher] %><%- end -%>\n<% end %>\n<%- unless its.empty? -%>### <%= its.join(', ') %><%- end -%>\n<%- if @descriptions.include?('advanced') -%>\n\n### :unlock: Advanced use\n<%= @descriptions['advanced'] %><%- end -%>\n\n" end |