Class: Phut::Setting
- Inherits:
-
Object
- Object
- Phut::Setting
- Defined in:
- lib/phut/setting.rb
Overview
Central configuration repository.
Constant Summary collapse
- DEFAULTS =
{ root: File.(File.join(File.dirname(__FILE__), '..', '..')), pid_dir: Dir.tmpdir, log_dir: Dir.tmpdir, socket_dir: Dir.tmpdir }
Instance Method Summary collapse
-
#initialize ⇒ Setting
constructor
A new instance of Setting.
- #log_dir ⇒ Object
- #log_dir=(path) ⇒ Object
- #pid_dir ⇒ Object
- #pid_dir=(path) ⇒ Object
- #root ⇒ Object
- #socket_dir ⇒ Object
- #socket_dir=(path) ⇒ Object
Constructor Details
Instance Method Details
#log_dir ⇒ Object
30 31 32 |
# File 'lib/phut/setting.rb', line 30 def log_dir @options.fetch :log_dir end |
#log_dir=(path) ⇒ Object
34 35 36 |
# File 'lib/phut/setting.rb', line 34 def log_dir=(path) @options[:log_dir] = File.(path) end |
#pid_dir ⇒ Object
22 23 24 |
# File 'lib/phut/setting.rb', line 22 def pid_dir @options.fetch :pid_dir end |
#pid_dir=(path) ⇒ Object
26 27 28 |
# File 'lib/phut/setting.rb', line 26 def pid_dir=(path) @options[:pid_dir] = File.(path) end |
#root ⇒ Object
18 19 20 |
# File 'lib/phut/setting.rb', line 18 def root @options.fetch :root end |
#socket_dir ⇒ Object
38 39 40 |
# File 'lib/phut/setting.rb', line 38 def socket_dir @options.fetch :socket_dir end |
#socket_dir=(path) ⇒ Object
42 43 44 |
# File 'lib/phut/setting.rb', line 42 def socket_dir=(path) @options[:socket_dir] = File.(path) end |