Class: Jekyll::ActivityPub::Delete
- Inherits:
-
Object
- Object
- Jekyll::ActivityPub::Delete
- Includes:
- Helper
- Defined in:
- lib/jekyll/activity_pub/delete.rb
Overview
Represents a Delete activity
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(site, actor, object) ⇒ Delete
constructor
Initialize with default data.
Methods included from Helper
#content, #generate_excerpt?, #hook_owner, #locale, #place_in_layout?, #pruned_data, #render_with_liquid?, #to_json, #to_liquid, #trigger_hooks
Constructor Details
#initialize(site, actor, object) ⇒ Delete
Initialize with default data
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/jekyll/activity_pub/delete.rb', line 18 def initialize(site, actor, object) @context = StubContext.new(registers: { site: site }) @data = { '@context' => 'https://www.w3.org/ns/activitystreams', 'id' => absolute_url(object.url).sub('.jsonld', '/delete.jsonld'), 'type' => 'Delete', 'actor' => absolute_url(actor.url), 'object' => object.data['id'] } trigger_hooks :post_init end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/jekyll/activity_pub/delete.rb', line 11 def data @data end |