Class: BarkestCore::UserAlert
- Inherits:
-
Object
- Object
- BarkestCore::UserAlert
- Includes:
- ActiveModel::Model, ActiveModel::Validations
- Defined in:
- app/models/barkest_core/user_alert.rb
Overview
This model provides informational alerts to the user.
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#model ⇒ Object
Returns the value of attribute model.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'app/models/barkest_core/user_alert.rb', line 8 def @message end |
#model ⇒ Object
Returns the value of attribute model.
8 9 10 |
# File 'app/models/barkest_core/user_alert.rb', line 8 def model @model end |
Instance Method Details
#type ⇒ Object
12 13 14 |
# File 'app/models/barkest_core/user_alert.rb', line 12 def type @type || :info end |
#type=(value) ⇒ Object
16 17 18 |
# File 'app/models/barkest_core/user_alert.rb', line 16 def type=(value) @type = value ? value.to_s.to_sym : nil end |
#view ⇒ Object
20 21 22 |
# File 'app/models/barkest_core/user_alert.rb', line 20 def view @view || 'generic_user_alert' end |
#view=(value) ⇒ Object
24 25 26 |
# File 'app/models/barkest_core/user_alert.rb', line 24 def view=(value) @view = value.blank? ? nil : value.to_s end |