Class: Rave::Models::Event::WaveletParticipantsChanged
- Inherits:
-
Rave::Models::Event
- Object
- Rave::Models::Event
- Rave::Models::Event::WaveletParticipantsChanged
- Defined in:
- lib/models/event.rb
Constant Summary collapse
- ADDED =
:nodoc:
'participantsAdded'
- REMOVED =
:nodoc:
'participantsRemoved'
Constants inherited from Rave::Models::Event
Constants included from Rave::Mixins::ObjectFactory
Rave::Mixins::ObjectFactory::WILDCARD
Instance Attribute Summary
Attributes included from Rave::Mixins::ObjectFactory
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ WaveletParticipantsChanged
constructor
:nodoc:.
-
#participants_added ⇒ Object
Array of participants added to the wavelet [Array of User].
-
#participants_removed ⇒ Object
Array of participants removed from the wavelet [Array of User].
Methods inherited from Rave::Models::Event
#blip, #blip_id, #modified_by, #timestamp, #wavelet
Methods included from Rave::Mixins::ObjectFactory
Methods included from Rave::Mixins::TimeUtils
Constructor Details
#initialize(options = {}) ⇒ WaveletParticipantsChanged
:nodoc:
87 88 89 90 91 92 |
# File 'lib/models/event.rb', line 87 def initialize( = {}) # :nodoc: super() add_user_ids(@properties[ADDED]) if @properties[ADDED] add_user_ids(@properties[REMOVED]) if @properties[REMOVED] end |
Instance Method Details
#participants_added ⇒ Object
Array of participants added to the wavelet [Array of User]
95 96 97 |
# File 'lib/models/event.rb', line 95 def participants_added # :nodoc: @properties[ADDED].map { |id| @context.users[id] } end |
#participants_removed ⇒ Object
Array of participants removed from the wavelet [Array of User].
100 101 102 |
# File 'lib/models/event.rb', line 100 def participants_removed # :nodoc: @properties[REMOVED].map { |id| @context.users[id] } end |