class Notification

Public Instance Methods

append(id, row) click to toggle source
# File lib/bull/notification.rb, line 62
def append id, row
  aux = state.notifications
  aux[id] = row
  state.notifications! aux
end
delete(id) click to toggle source
# File lib/bull/notification.rb, line 74
def delete id
  aux = state.notifications
  aux.delete id
  state.notifications! aux
end
render() click to toggle source
# File lib/bull/notification.rb, line 80
def render
  div(style: {position: 'absolute'}) do
    state.notifications.each_pair do |k, (animation, code, v, level)|
      div(key: k, class: animation + ' notification ' + code){v}
    end
  end
end
update(id, row) click to toggle source
# File lib/bull/notification.rb, line 68
def update id, row
  aux = state.notifications
  aux[id] = row
  state.notifications! aux
end