Module: Messages

Defined in:
lib/log_query/messages.rb,
lib/log_query/messages/heroku_router.rb,
lib/log_query/messages/heroku_web/rails.rb,
lib/log_query/messages/message_type_matcher.rb

Defined Under Namespace

Modules: HerokuWeb Classes: HerokuRouter, MessageTypeMatcher, String

Class Method Summary collapse

Class Method Details

.class_from_attributes(attrs) ⇒ Object



5
6
7
8
9
# File 'lib/log_query/messages.rb', line 5

def self.class_from_attributes(attrs)
  [HerokuRouter, HerokuWeb::Rails].select do |klass|
    attrs.map(&:to_sym).all? { |a| klass.attributes.include?(a) }
  end
end

.resolve_message(source, dyno) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/log_query/messages.rb', line 11

def self.resolve_message(source, dyno)
  case [source, dyno]
  when HerokuWeb::Rails
    HerokuWeb::Rails
  when HerokuRouter
    HerokuRouter
  else
    String
  end
end