Class: Chom::App
- Inherits:
-
Object
- Object
- Chom::App
- Defined in:
- lib/chom.rb
Overview
The App class stores Chom’s functionality. It is executed with Chom::App.new.run.
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ App
constructor
Creates Chom instance and sets user and group.
-
#run ⇒ Object
Chom command line utility executes run to recursively chown and chmod the current directory.
Constructor Details
#initialize ⇒ App
Creates Chom instance and sets user and group
17 18 19 20 |
# File 'lib/chom.rb', line 17 def initialize @user = Etc.getlogin @group = system_www_group end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
14 15 16 |
# File 'lib/chom.rb', line 14 def user @user end |
Instance Method Details
#run ⇒ Object
Chom command line utility executes run to recursively chown and chmod the current directory.
23 24 25 26 |
# File 'lib/chom.rb', line 23 def run chown_dir_and_files_recursively chmod_dir_and_files_recursively end |