Class: BuckKnife::ProjectPresenter

Inherits:
Chef::Knife::Core::GenericPresenter
  • Object
show all
Defined in:
lib/chef/knife/project_show.rb

Instance Method Summary collapse

Instance Method Details

#key(key_text) ⇒ Object



29
30
31
# File 'lib/chef/knife/project_show.rb', line 29

def key(key_text)
  ui.color(key_text, :cyan)
end

#summarize(project) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/chef/knife/project_show.rb', line 21

def summarize(project)
  summarized = "\#{ui.color('Project Name:', :bold)} \#{ui.color(project.name, :bold)}\n\#{key('Environments:')} \#{project.environment_names.join(', ')}\n\#{key('Nodes:')}        \#{project.node_names.join(\"\\n\" + ' ' * 14)}\n  SUMMARY\nend\n"