Method: Pod::UserInterface.titled_section

Defined in:
lib/cocoapods/user_interface.rb

.titled_section(title, options = {}) ⇒ void

This method returns an undefined value.

In verbose mode it shows the sections and the contents. In normal mode it just prints the title.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/cocoapods/user_interface.rb', line 75

def titled_section(title, options = {})
  relative_indentation = options[:relative_indentation] || 0
  verbose_prefix = options[:verbose_prefix] || ''
  if config.verbose?
    title(title, verbose_prefix, relative_indentation)
  else
    puts title
  end

  self.indentation_level += relative_indentation
  self.title_level += 1
  yield if block_given?
ensure
  self.indentation_level -= relative_indentation
  self.title_level -= 1
end