Module: Hyrax::WithEvents
- Included in:
- FileSetBehavior, FileSetPresenter, WorkBehavior
- Defined in:
- app/models/concerns/hyrax/with_events.rb
Instance Method Summary collapse
Instance Method Details
#event_class ⇒ Object
7 8 9 |
# File 'app/models/concerns/hyrax/with_events.rb', line 7 def event_class self.class.name end |
#events(size = -1)) ⇒ Object
11 12 13 |
# File 'app/models/concerns/hyrax/with_events.rb', line 11 def events(size = -1) event_stream.fetch(size) end |
#log_event(event_id) ⇒ Object
15 16 17 |
# File 'app/models/concerns/hyrax/with_events.rb', line 15 def log_event(event_id) event_stream.push(event_id) end |
#stream ⇒ Object
3 4 5 |
# File 'app/models/concerns/hyrax/with_events.rb', line 3 def stream Nest.new(event_class)[to_param] end |