Class: ConfigProcessor
- Inherits:
-
Object
- Object
- ConfigProcessor
- Defined in:
- lib/guard/nginx/config_processor.rb
Instance Method Summary collapse
- #config_fetch(key) ⇒ Object
- #config_path ⇒ Object
- #get_binding ⇒ Object
-
#initialize(options = {}) ⇒ ConfigProcessor
constructor
A new instance of ConfigProcessor.
- #pid_path ⇒ Object
- #root_path ⇒ Object
- #tmp_path ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ConfigProcessor
Returns a new instance of ConfigProcessor.
2 3 4 |
# File 'lib/guard/nginx/config_processor.rb', line 2 def initialize( = {}) @config = end |
Instance Method Details
#config_fetch(key) ⇒ Object
6 7 8 |
# File 'lib/guard/nginx/config_processor.rb', line 6 def config_fetch(key) @config.fetch(key.to_sym) { false } end |
#config_path ⇒ Object
14 15 16 |
# File 'lib/guard/nginx/config_processor.rb', line 14 def config_path "#{root_path}/config" end |
#get_binding ⇒ Object
26 27 28 |
# File 'lib/guard/nginx/config_processor.rb', line 26 def get_binding binding end |
#pid_path ⇒ Object
22 23 24 |
# File 'lib/guard/nginx/config_processor.rb', line 22 def pid_path "#{Dir.pwd}/tmp/pids/nginx.pid" end |
#root_path ⇒ Object
10 11 12 |
# File 'lib/guard/nginx/config_processor.rb', line 10 def root_path Dir.pwd end |
#tmp_path ⇒ Object
18 19 20 |
# File 'lib/guard/nginx/config_processor.rb', line 18 def tmp_path "#{root_path}/tmp" end |