Class: Cmdlib::Describe

Inherits:
Object
  • Object
show all
Defined in:
lib/cmdlib/describe.rb

Class Method Summary collapse

Class Method Details

.outtitle(str) ⇒ Object

Display title in follow format: *** [title] ***.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/cmdlib/describe.rb', line 5

def self.outtitle ( str )
  if( str.length < (80-4) ) then
  borderlen = 80 - str.length - 4
  print '*' * (borderlen/2)
  print '[ '
  print str
  print ' ]'
  puts '*' * (borderlen/2)
  else
  puts str
  end
end