Class: Einstein::Menu

Inherits:
Object
  • Object
show all
Defined in:
lib/einstein/menu.rb

Instance Method Summary collapse

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

#dishesObject



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