Class: Chom::App

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeApp

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

#userObject (readonly)

Returns the value of attribute user.



14
15
16
# File 'lib/chom.rb', line 14

def user
  @user
end

Instance Method Details

#runObject

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