Module: Syndication::Google

Included in:
Atom::Entry, Atom::Feed
Defined in:
lib/syndication/google.rb

Overview

Mixin for Google Data in Atom feeds.

If you require 'syndication/google' these methods are added to the Syndication::Atom::Entry and Syndication::Atom::Feed classes.

See code.google.com/apis/gdata/calendar.html for more information on Google Calendar Data APIs.

See examples/google.rb for a simple example.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#gd_whereObject

Where the event is to occur



18
19
20
# File 'lib/syndication/google.rb', line 18

def gd_where
  @gd_where
end

Instance Method Details

#gd_whenObject

When the event is to occur, as an Array of [start DateTime, end DateTime].



36
37
38
39
40
41
42
43
44
45
# File 'lib/syndication/google.rb', line 36

def gd_when
  s = e = nil
  if @starttime
    s = DateTime.parse(@starttime)
  end
  if @endtime
    e = DateTime.parse(@endtime)
  end
  return [s,e]
end

#gd_when=(attrs) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/syndication/google.rb', line 26

def gd_when=(attrs)
  if attrs['startTime']
    @starttime = attrs['startTime']
  end
  if attrs['endTime']
    @endtime = attrs['endTime']
  end
end