Class: GoogleAppsApi::CalendarEntity

Inherits:
Entity
  • Object
show all
Defined in:
lib/google_apps_api/calendar.rb

Constant Summary

Constants inherited from Entity

Entity::VALID_ENTITY_TYPES

Instance Attribute Summary collapse

Attributes inherited from Entity

#domain, #id, #kind

Instance Method Summary collapse

Methods inherited from Entity

#full_id, #full_id_escaped, #id_escaped, #qualified_id, #qualified_id_escaped

Constructor Details

#initialize(*args) ⇒ CalendarEntity

Returns a new instance of CalendarEntity.



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/google_apps_api/calendar.rb', line 239

def initialize(*args)
  @details = {}
  
  options = args.extract_options!
  if options.has_key?(:xml)
    parse_calendar_xml(options[:xml])
    super(:calendar => @calendar_id)
  else
    @title = options.delete(:title)
    
    if args.first.kind_of?(String)
      super(:calendar => args.first)
    else
      super(options.merge(:kind => "calendar"))
    end
  end
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



237
238
239
# File 'lib/google_apps_api/calendar.rb', line 237

def details
  @details
end

Instance Method Details

#==(other) ⇒ Object



257
258
259
# File 'lib/google_apps_api/calendar.rb', line 257

def ==(other)
  super(other)
end

#get_acls(c_api, *args) ⇒ Object

# updates with details. def refresh_details!(c_api, *args)

c_api.retrieve_calendar_details(self, *args)

end



267
268
269
# File 'lib/google_apps_api/calendar.rb', line 267

def get_acls(c_api, *args)
  c_api.retrieve_acls_for_calendar(self, *args)
end