Class: Rabbit::Config
Instance Method Summary collapse
- #app_name ⇒ Object (also: #read_queue)
- #skip_publish? ⇒ Boolean
- #validate! ⇒ Object
Instance Method Details
#app_name ⇒ Object Also known as: read_queue
55 56 57 |
# File 'lib/rabbit.rb', line 55 def app_name [group_id, project_id].join(".") end |
#skip_publish? ⇒ Boolean
51 52 53 |
# File 'lib/rabbit.rb', line 51 def skip_publish? skip_publishing_in.include?(environment) end |
#validate! ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/rabbit.rb', line 42 def validate! raise InvalidConfig, "mising project_id" unless project_id raise InvalidConfig, "mising group_id" unless group_id unless environment.in? %i[test development production] raise "environment should be one of (test, development, production)" end end |