Class: DailyRep::Notificator
- Inherits:
-
Object
- Object
- DailyRep::Notificator
- Defined in:
- lib/dailyrep/Notificator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(push_token, note_title = Configer.push_note_title) ⇒ Notificator
constructor
A new instance of Notificator.
- #push_note(note) ⇒ Object
Constructor Details
#initialize(push_token, note_title = Configer.push_note_title) ⇒ Notificator
Returns a new instance of Notificator.
12 13 14 15 |
# File 'lib/dailyrep/Notificator.rb', line 12 def initialize(push_token, note_title=Configer.push_note_title) @client = Washbullet::Client.new(push_token) @note_title = note_title end |
Class Method Details
.get_clients ⇒ Object
5 6 7 8 9 10 |
# File 'lib/dailyrep/Notificator.rb', line 5 def self.get_clients result = [] result = Configer.get_client_tokens.map { |token| new token } end |
Instance Method Details
#push_note(note) ⇒ Object
17 18 19 |
# File 'lib/dailyrep/Notificator.rb', line 17 def push_note note @client.push_note(nil, @note_title, note) end |