Class: AuthRocket::Event
- Inherits:
-
Resource
- Object
- Resource
- AuthRocket::Event
- Defined in:
- lib/authrocket/event.rb
Instance Attribute Summary collapse
-
#event_type ⇒ Object
readonly
Returns the value of attribute event_type.
Instance Method Summary collapse
Instance Attribute Details
#event_type ⇒ Object (readonly)
Returns the value of attribute event_type.
13 14 15 |
# File 'lib/authrocket/event.rb', line 13 def event_type @event_type end |
Instance Method Details
#find_notification(nid) ⇒ Object
32 33 34 |
# File 'lib/authrocket/event.rb', line 32 def find_notification(nid) notifications.detect{|n| n.id == nid} || raise(RecordNotFound) end |
#notifications ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/authrocket/event.rb', line 21 def notifications reload unless @attribs[:notifications] unless @stuffed_event @attribs[:notifications].each do |n| n.send :load, data: {event: self, event_id: id} end @stuffed_event = true end @attribs[:notifications] end |
#request_data ⇒ Object
16 17 18 |
# File 'lib/authrocket/event.rb', line 16 def request_data self[:request] end |