Class: Einstein::Menu
- Inherits:
-
Object
- Object
- Einstein::Menu
- Defined in:
- lib/einstein/menu.rb
Instance Method Summary collapse
- #dishes ⇒ Object
-
#initialize(whenever) ⇒ Menu
constructor
A new instance of Menu.
- #push_to(api_key) ⇒ Object
Constructor Details
#initialize(whenever) ⇒ Menu
Returns a new instance of Menu.
6 7 8 |
# File 'lib/einstein/menu.rb', line 6 def initialize(whenever) @whenever = whenever end |
Instance Method Details
#dishes ⇒ Object
13 14 15 |
# File 'lib/einstein/menu.rb', line 13 def dishes cached_dishes end |
#push_to(api_key) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/einstein/menu.rb', line 20 def push_to(api_key) unless cached_dishes.empty? Prowl.add({ apikey: api_key, application: "Einstein ", event: " #{@whenever.to_s.titleize}'s menu", description: cached_dishes.join(", ") }) end end |