Class: Piggy::Subscribers

Inherits:
Object
  • Object
show all
Defined in:
lib/piggy/subscribers.rb

Class Method Summary collapse

Class Method Details

.add(subscriber) ⇒ Object



11
12
13
# File 'lib/piggy/subscribers.rb', line 11

def self.add(subscriber)
  store.save(subscriber)
end

.notify(event) ⇒ Object



5
6
7
8
9
# File 'lib/piggy/subscribers.rb', line 5

def self.notify(event)
  store.all.each do |subscriber|
    `./#{subscriber} "#{event.title}"`
  end
end