Module: Condom

Defined in:
lib/condom/cv.rb,
lib/condom.rb,
lib/condom/base.rb,
lib/condom/letter.rb,
lib/condom/classic.rb,
lib/condom/presentation.rb

Overview

The Condom module

Defined Under Namespace

Classes: Base, CV, Classic, Letter, Presentation

Constant Summary collapse

VERSION =

Lib version

'2.0.1'
VIEWS_DIR =

Constant views directory

File.join(File.expand_path(File.dirname(__FILE__)), 'views')

Class Method Summary collapse

Class Method Details

.get_user_nameObject

Function to get the name of the user. It will be the name in the /etc/passwd file (on Un*x system) or the system user.



26
27
28
29
30
31
# File 'lib/condom.rb', line 26

def get_user_name
  user = Etc.getpwnam(Etc.getlogin)['gecos'].split(',').first
  user = Etc.getlogin if user.nil?

  return user
end