Module: RubyRabbitmqJanus::Tools::ConfigRabbit
- Included in:
- Config
- Defined in:
- lib/rrj/tools/gem/config/rabbit.rb
Overview
Subclass for Config
Options about bunny
Instance Method Summary collapse
-
#admin_pass ⇒ String
Read configuration fir queue admin.
-
#log_level_rabbit ⇒ Symbol
Read configuration for bunny log level.
-
#server_settings ⇒ Hash
Format hash for bunny settings.
Instance Method Details
#admin_pass ⇒ String
Returns read configuration fir queue admin.
14 15 16 |
# File 'lib/rrj/tools/gem/config/rabbit.rb', line 14 def admin_pass @options['rabbit']['admin_pass'].to_s end |
#log_level_rabbit ⇒ Symbol
Returns read configuration for bunny log level.
19 20 21 |
# File 'lib/rrj/tools/gem/config/rabbit.rb', line 19 def log_level_rabbit @options['rabbit']['level'].upcase.to_sym || :INFO end |
#server_settings ⇒ Hash
Returns Format hash for bunny settings.
24 25 26 27 28 29 30 31 |
# File 'lib/rrj/tools/gem/config/rabbit.rb', line 24 def server_settings Hash[%w[host port pass user vhost log_level].map do |value| [ value.to_sym, @options['rabbit'][value.eql?('log_level') ? 'level' : value] ] end] end |