summaryrefslogtreecommitdiff
path: root/lib/sublab_calendar
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sublab_calendar')
-rw-r--r--lib/sublab_calendar/event_list.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/sublab_calendar/event_list.rb b/lib/sublab_calendar/event_list.rb
new file mode 100644
index 0000000..cc2d62b
--- /dev/null
+++ b/lib/sublab_calendar/event_list.rb
@@ -0,0 +1,19 @@
+require 'set'
+
+module SublabCalendar
+
+ class EventList
+
+ attr_reader :events
+
+ def initialize(events=[])
+ @events = SortedSet.new(events)
+ end
+
+ def to_json(*args)
+ events.map(&:to_json)
+ end
+
+ end
+
+end