Class: SakaiInfo::MissingCalendar

Inherits:
Calendar show all
Defined in:
lib/sakai-info/calendar.rb

Instance Attribute Summary

Attributes inherited from Calendar

#dbrow, #next_id

Attributes inherited from SakaiXMLEntity

#attributes, #properties, #xml, #xmldoc

Attributes inherited from SakaiObject

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Calendar

clear_cache, #events_serialization, find!, #site, #site_id, #xml, #xml_serialization

Methods inherited from SakaiXMLEntity

#attributes_serialization, #dbrow_serialization, #parse_xml, #properties_serialization, #xml_serialization

Methods included from ModProps

included

Methods inherited from SakaiObject

#dbrow_only_serialization, #dbrow_serialization, descendants, #object_type_serialization, #serialize, #shell_serialization, #to_csv, #to_json, #to_yaml

Constructor Details

#initialize(row) ⇒ MissingCalendar

Returns a new instance of MissingCalendar.



120
121
122
123
124
# File 'lib/sakai-info/calendar.rb', line 120

def initialize(row)
  @dbrow = row

  @id = @dbrow[:id]
end

Class Method Details

.all_serializationsObject



150
151
152
153
154
# File 'lib/sakai-info/calendar.rb', line 150

def self.all_serializations
  [
   :default,
  ]
end

.find(id) ⇒ Object



126
127
128
# File 'lib/sakai-info/calendar.rb', line 126

def self.find(id)
  MissingCalendar.new({:id => id})
end

Instance Method Details

#default_serializationObject



138
139
140
141
142
# File 'lib/sakai-info/calendar.rb', line 138

def default_serialization
  {
    "status" => "No Calendar for #{self.id}",
  }
end

#event_countObject



130
131
132
# File 'lib/sakai-info/calendar.rb', line 130

def event_count
  0
end

#eventsObject



134
135
136
# File 'lib/sakai-info/calendar.rb', line 134

def events
  []
end

#summary_serializationObject



144
145
146
147
148
# File 'lib/sakai-info/calendar.rb', line 144

def summary_serialization
  {
    "status" => "No Calendar",
  }
end