Class: Aws::Templates::Help::Rdoc::Inheritable

Inherits:
Provider show all
Defined in:
lib/aws/templates/help/rdoc/inheritable.rb

Overview

Common functionality for documenting inheritable properties.

Examples of inheritable properties:

  • parameters

  • context filters

Those have one thing in common: they are inherited from a parent class to any child and to generate full documentation you need to go over all of them respecting class/module hierarchy. The class implements utility methods and provides IoC stubs to define specific behaviors with ease.

Instance Attribute Summary

Attributes inherited from Processor::Handler

#context, #parameters

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Texting

#document, #list, #parsed_for, #sub, #text

Methods inherited from Processor::Handler

for_entity, #handler_for, #in_context, #initialize, #processed_for, processor, #processor, register_in

Constructor Details

This class inherits a constructor from Aws::Templates::Processor::Handler

Class Method Details

.header(header = nil) ⇒ Object



18
19
20
21
# File 'lib/aws/templates/help/rdoc/inheritable.rb', line 18

def self.header(header = nil)
  return @header if header.nil?
  @header = header
end

Instance Method Details

#provideObject



23
24
25
26
# File 'lib/aws/templates/help/rdoc/inheritable.rb', line 23

def provide
  desc = ancestors_description
  sub(text(self.class.header.gsub(/(\S+)/, '_\1_')), desc) if desc
end