Class: Mastodon::Notification
- Inherits:
-
Base
- Object
- Base
- Mastodon::Notification
show all
- Defined in:
- lib/mastodon/notification.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#attributes
Instance Method Summary
collapse
Methods inherited from Base
collection_attr_reader, define_attribute_method, define_predicate_method, normal_attr_reader, object_attr_reader, predicate_attr_reader
Constructor Details
#initialize(attributes = {}) ⇒ Notification
Returns a new instance of Notification.
21
22
23
24
|
# File 'lib/mastodon/notification.rb', line 21
def initialize(attributes = {})
attributes.fetch('id')
super
end
|
Instance Attribute Details
16
|
# File 'lib/mastodon/notification.rb', line 16
normal_attr_reader :id, :type, :created_at
|
#created_at ⇒ String
16
|
# File 'lib/mastodon/notification.rb', line 16
normal_attr_reader :id, :type, :created_at
|
#id ⇒ String
16
|
# File 'lib/mastodon/notification.rb', line 16
normal_attr_reader :id, :type, :created_at
|
16
|
# File 'lib/mastodon/notification.rb', line 16
normal_attr_reader :id, :type, :created_at
|
#type ⇒ String
16
|
# File 'lib/mastodon/notification.rb', line 16
normal_attr_reader :id, :type, :created_at
|
Instance Method Details
#status? ⇒ Boolean
Does this notification include a status?
28
29
30
|
# File 'lib/mastodon/notification.rb', line 28
def status?
attributes.key?('status')
end
|