module AmaLayout::Notifications::InstanceMethods

Public Instance Methods

notifications() click to toggle source
# File lib/ama_layout/notifications.rb, line 22
def notifications
  @notifications ||= NotificationSet.new(_store, _foreign_key)
end
notifications=(other) click to toggle source
# File lib/ama_layout/notifications.rb, line 26
def notifications=(other)
  @notifications = other
end

Private Instance Methods

_foreign_key() click to toggle source
# File lib/ama_layout/notifications.rb, line 36
def _foreign_key
  self.class._notification_foreign_key.call(self)
end
_store() click to toggle source
# File lib/ama_layout/notifications.rb, line 32
def _store
  self.class._notification_store || invalid_store!
end
invalid_store!() click to toggle source
# File lib/ama_layout/notifications.rb, line 40
def invalid_store!
  raise InvalidNotificationStore, 'a notification store must be specified'
end