Class: Uc::Paths
- Inherits:
-
Object
show all
- Includes:
- Logger
- Defined in:
- lib/uc/paths.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Logger
#event_queue, event_stream, #event_stream, logger, #logger, stderr, #stderr
Constructor Details
#initialize(app_dir) ⇒ Paths
Returns a new instance of Paths.
11
12
13
|
# File 'lib/uc/paths.rb', line 11
def initialize(app_dir)
@app_dir = Pathname.new(app_dir )
end
|
Instance Attribute Details
#app_dir ⇒ Object
Returns the value of attribute app_dir.
9
10
11
|
# File 'lib/uc/paths.rb', line 9
def app_dir
@app_dir
end
|
Instance Method Details
#errors ⇒ Object
35
36
37
|
# File 'lib/uc/paths.rb', line 35
def errors
@errors ||= []
end
|
#log_dir ⇒ Object
19
20
21
|
# File 'lib/uc/paths.rb', line 19
def log_dir
absolute_path "log"
end
|
#pid_dir ⇒ Object
31
32
33
|
# File 'lib/uc/paths.rb', line 31
def pid_dir
absolute_path "tmp/pids"
end
|
#rack ⇒ Object
15
16
17
|
# File 'lib/uc/paths.rb', line 15
def rack
absolute_path "config.ru"
end
|
#socket_dir ⇒ Object
27
28
29
|
# File 'lib/uc/paths.rb', line 27
def socket_dir
absolute_path "tmp/sockets"
end
|
#tmp_dir ⇒ Object
23
24
25
|
# File 'lib/uc/paths.rb', line 23
def tmp_dir
absolute_path "tmp"
end
|
#validate_required ⇒ Object
39
40
41
42
43
|
# File 'lib/uc/paths.rb', line 39
def validate_required
validate_required_dirs
verify_readable rack
log_and_raise_errors
end
|