Module: CampfireChat::Checks::PairMessage

Extended by:
CampfireChat::Checks
Defined in:
lib/campfire_chat/checks/pair_message.rb

Class Method Summary collapse

Methods included from CampfireChat::Checks

checks, extended, process

Class Method Details

.process_notification(notification) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/campfire_chat/checks/pair_message.rb', line 6

def self.process_notification(notification)
  CampfireChat.config.pairs.each do |pair|
    if notification.message.body.include?(pair.name)
      notification.important!
      notification.add_title title(pair)
    end
  end
end

.title(pair) ⇒ Object



15
16
17
# File 'lib/campfire_chat/checks/pair_message.rb', line 15

def self.title(pair)
  "#{pair.name}:"
end