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.
19
20
21
22
|
# File 'lib/mastodon/notification.rb', line 19
def initialize(attributes = {})
attributes.fetch('id')
super
end
|
Instance Attribute Details
14
|
# File 'lib/mastodon/notification.rb', line 14
normal_attr_reader :id, :type, :created_at
|
#created_at ⇒ String
14
|
# File 'lib/mastodon/notification.rb', line 14
normal_attr_reader :id, :type, :created_at
|
#id ⇒ String
14
|
# File 'lib/mastodon/notification.rb', line 14
normal_attr_reader :id, :type, :created_at
|
14
|
# File 'lib/mastodon/notification.rb', line 14
normal_attr_reader :id, :type, :created_at
|
#type ⇒ String
14
|
# File 'lib/mastodon/notification.rb', line 14
normal_attr_reader :id, :type, :created_at
|
Instance Method Details
#status? ⇒ Boolean
Does this notification include a status?
26
27
28
|
# File 'lib/mastodon/notification.rb', line 26
def status?
attributes.key?('status')
end
|