Module: SiriCal::InstanceMethods

Defined in:
lib/siri_cal/methods.rb

Instance Method Summary collapse

Instance Method Details

#calendarObject

Public: Initialize calendar

Returns an instance of Google::Calendar.



34
35
36
# File 'lib/siri_cal/methods.rb', line 34

def calendar
  Google::Calendar.new :username => , :password => siri_cal_password, :calendar => calendar_name
end

#execute_siri!Object

Public: GET calendar’s event and run then according to block defined in lib/siri_says.rb

Returns nothing.



41
42
43
44
45
46
47
# File 'lib/siri_cal/methods.rb', line 41

def execute_siri!
  SayProxy.load_files
  calendar.events.to_a.each do |event|
    res = SayProxy.invoke_say(event, self)
    event.delete if (res && delete_event == :success) || delete_event == :always
  end
end