Module: Condom
- Defined in:
- lib/condom/base.rb,
lib/condom.rb,
lib/condom/letter.rb,
lib/condom/document.rb,
lib/condom/presentation.rb
Overview
The Condom module
Defined Under Namespace
Classes: Base, Document, Letter, Presentation
Constant Summary collapse
- VERSION =
Lib version
'1.0.1'
- VIEWS_DIR =
Constant views directory
File.join(File.(File.dirname(__FILE__)), 'views')
Class Method Summary collapse
-
.get_user_name ⇒ Object
Function to get the name of the user.
Class Method Details
.get_user_name ⇒ Object
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.
25 26 27 28 29 30 |
# File 'lib/condom.rb', line 25 def get_user_name user = Etc.getpwnam(Etc.getlogin)['gecos'].split(',').first user = Etc.getlogin if user.nil? return user end |