Module: Lono::Pro::Help

Defined in:
lib/lono/pro/help.rb

Class Method Summary collapse

Class Method Details

.lono_pro_addon_noteObject



14
15
16
17
18
19
20
# File 'lib/lono/pro/help.rb', line 14

def lono_pro_addon_note
  <<~EOL
    ## Lono Pro

    This is a lono-pro addon command.
  EOL
end

.text(namespaced_command) ⇒ Object

namespaced_command: cfn/create or cfn:create both work.



5
6
7
8
9
10
11
12
# File 'lib/lono/pro/help.rb', line 5

def text(namespaced_command)
  path = namespaced_command.to_s.gsub(':','/')
  path = File.expand_path("../help/#{path}.md", __FILE__)
  if File.exist?(path)
    content = IO.read(path)
    content.strip + "\n\n" + lono_pro_addon_note
  end
end