Class: Kafo::HelpBuilders::Advanced

Inherits:
Base
  • Object
show all
Defined in:
lib/kafo/help_builders/advanced.rb

Instance Method Summary collapse

Methods inherited from Base

#add_list, #initialize

Methods included from StringHelper

#dashize, #parametrize, #underscore, #with_prefix

Constructor Details

This class inherits a constructor from Kafo::HelpBuilders::Base

Instance Method Details

#add_module(name, items) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/kafo/help_builders/advanced.rb', line 6

def add_module(name, items)
  data = by_parameter_groups(items)
  if data.keys.size > 1
    line module_header(name + ':')
    data.keys.each do |group|
      add_list(header(2, group), data[group])
    end
  else
    add_list(module_header(name), data[data.keys.first])
  end
end