Class: Signum::NotificationBody::Component
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Signum::NotificationBody::Component
- Defined in:
- app/components/signum/notification_body/component.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#signal ⇒ Object
readonly
Returns the value of attribute signal.
Instance Method Summary collapse
-
#initialize(signal, data) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(signal, data) ⇒ Component
Returns a new instance of Component.
12 13 14 15 |
# File 'app/components/signum/notification_body/component.rb', line 12 def initialize(signal, data) @signal = signal @data = data.nil? ? {} : data.deep_symbolize_keys end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'app/components/signum/notification_body/component.rb', line 10 def data @data end |
#signal ⇒ Object (readonly)
Returns the value of attribute signal.
10 11 12 |
# File 'app/components/signum/notification_body/component.rb', line 10 def signal @signal end |