Class: Jekyll::ActivityPub::Delete

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/jekyll/activity_pub/delete.rb

Overview

Represents a Delete activity

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:



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

#dataObject (readonly)

Returns the value of attribute data.



11
12
13
# File 'lib/jekyll/activity_pub/delete.rb', line 11

def data
  @data
end