Class: Lono::Markdown::Index
- Inherits:
-
Object
- Object
- Lono::Markdown::Index
- Defined in:
- lib/lono/markdown/index.rb
Instance Method Summary collapse
- #command_list ⇒ Object
- #doc ⇒ Object
-
#initialize(command_class) ⇒ Index
constructor
A new instance of Index.
- #path ⇒ Object
- #summary ⇒ Object
Constructor Details
#initialize(command_class) ⇒ Index
Returns a new instance of Index.
3 4 5 |
# File 'lib/lono/markdown/index.rb', line 3 def initialize(command_class) @command_class = command_class end |
Instance Method Details
#command_list ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/lono/markdown/index.rb', line 11 def command_list @command_class.commands.keys.sort.map.each do |command_name| page = Page.new(@command_class, command_name) link = page.path.sub("docs/", "") # Example: [lono cfn]({% link _reference/lono-cfn.md %}) "* [lono #{command_name}]({% link #{link} %})" end.join("\n") end |
#doc ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/lono/markdown/index.rb', line 26 def doc <<-EOL --- title: CLI Reference --- #{summary} #{command_list} EOL end |
#path ⇒ Object
7 8 9 |
# File 'lib/lono/markdown/index.rb', line 7 def path "docs/reference.md" end |
#summary ⇒ Object
20 21 22 23 24 |
# File 'lib/lono/markdown/index.rb', line 20 def summary <<-EOL Lono is a CloudFormation framework tool that helps you manage your templates. Lono handles the entire CloudFormation lifecycle. It starts with helping you develop your templates and helps you all the way to the infrastructure provisioning step. EOL end |