Class: EinsteinContainer::Container

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

Instance Method Summary collapse

Constructor Details

#initialize(*values, whenever) ⇒ Container

Returns a new instance of Container.



3
4
5
6
# File 'lib/einstein/container.rb', line 3

def initialize(*values, whenever)
  @whenever = whenever
  super(*values)
end

Instance Method Details

#push_to(api_key) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/einstein/container.rb', line 8

def push_to(api_key)
  Prowl.add({
    apikey:       api_key,
    application:  "Einstein ",
    event:        " #{@whenever.to_s.titleize}'s menu",
    description:  self.join(", ")
  }) unless self.empty?
end