Class: GCal::Feed

Inherits:
GData::Feed
  • Object
show all
Defined in:
lib/gdata/calendar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Feed

:magic_cookie => … :project => one of :full, :basic :visibility => :private, :public, “magic-cookie” :projection => :full, :full_noattendees, :composite, :attendees_only, :free_busy, :basic :user_id => :default, “[email protected]

Raises:

  • (ArgumentError)


21
22
23
24
25
26
27
28
29
30
# File 'lib/gdata/calendar.rb', line 21

def initialize(options)
  @magic_cookie = options.delete(:magic_cookie)

  @visibility = @magic_cookie && !options[:visiblity] \
  ? :private \
  : options.delete(:visibility) || :public
  @projection = options.delete(:projection) || :full
  @user_id = options.delete(:user_id)
  raise ArgumentError, "User ID has to be specified for calendar feed" unless user_id
end

Instance Attribute Details

Returns the value of attribute magic_cookie.



14
15
16
# File 'lib/gdata/calendar.rb', line 14

def magic_cookie
  @magic_cookie
end

#projectionObject (readonly)

Returns the value of attribute projection.



15
16
17
# File 'lib/gdata/calendar.rb', line 15

def projection
  @projection
end

#user_idObject (readonly)

Returns the value of attribute user_id.



14
15
16
# File 'lib/gdata/calendar.rb', line 14

def user_id
  @user_id
end

#visibilityObject (readonly)

Returns the value of attribute visibility.



15
16
17
# File 'lib/gdata/calendar.rb', line 15

def visibility
  @visibility
end