Module: ProconBypassMan::Configuration::ClassMethods
- Included in:
- ProconBypassMan
- Defined in:
- lib/procon_bypass_man/configuration.rb
Instance Method Summary collapse
- #cache ⇒ Object
- #device_id ⇒ String
- #digest_path ⇒ Object
- #error_logger ⇒ Object
- #fallback_setting_path ⇒ Object
- #logger ⇒ Object
- #never_exit_accidentally ⇒ Boolean
- #pid ⇒ Integer?
- #pid_path ⇒ Object
- #root ⇒ Object
- #session_id ⇒ String
Instance Method Details
#cache ⇒ Object
33 34 35 |
# File 'lib/procon_bypass_man/configuration.rb', line 33 def cache @@cache_table ||= ProconBypassMan::OnMemoryCache.new end |
#device_id ⇒ String
43 44 45 |
# File 'lib/procon_bypass_man/configuration.rb', line 43 def device_id ENV["DEBUG_DEVICE_ID"] || ProconBypassMan::WriteDeviceIdCommand.execute end |
#digest_path ⇒ Object
29 30 31 |
# File 'lib/procon_bypass_man/configuration.rb', line 29 def digest_path config.digest_path end |
#error_logger ⇒ Object
14 15 16 |
# File 'lib/procon_bypass_man/configuration.rb', line 14 def error_logger config.error_logger end |
#fallback_setting_path ⇒ Object
52 53 54 |
# File 'lib/procon_bypass_man/configuration.rb', line 52 def fallback_setting_path "/tmp/procon_bypass_man_fallback_setting.yaml" end |
#logger ⇒ Object
10 11 12 |
# File 'lib/procon_bypass_man/configuration.rb', line 10 def logger config.logger end |
#never_exit_accidentally ⇒ Boolean
48 49 50 |
# File 'lib/procon_bypass_man/configuration.rb', line 48 def never_exit_accidentally config.never_exit_accidentally end |
#pid ⇒ Integer?
23 24 25 26 27 |
# File 'lib/procon_bypass_man/configuration.rb', line 23 def pid File.read(pid_path).to_i rescue Errno::ENOENT nil end |
#pid_path ⇒ Object
18 19 20 |
# File 'lib/procon_bypass_man/configuration.rb', line 18 def pid_path @@pid_path ||= File.("#{root}/pbm_pid", __dir__).freeze end |
#root ⇒ Object
6 7 8 |
# File 'lib/procon_bypass_man/configuration.rb', line 6 def root config.root end |
#session_id ⇒ String
38 39 40 |
# File 'lib/procon_bypass_man/configuration.rb', line 38 def session_id ProconBypassMan::WriteSessionIdCommand.execute end |