Class: Jekyll::ActivityPub::Link
- Inherits:
-
Object
- Object
- Jekyll::ActivityPub::Link
- Includes:
- Helper
- Defined in:
- lib/jekyll/activity_pub/link.rb
Overview
Represents a Link
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(site, href, rel = nil, media_type = nil) ⇒ Link
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, href, rel = nil, media_type = nil) ⇒ Link
Initialize with default data
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/jekyll/activity_pub/link.rb', line 19 def initialize(site, href, rel = nil, media_type = nil) @site = site @data = { 'type' => 'Link', 'mediaType' => media_type, 'href' => href, 'rel' => rel } 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/link.rb', line 11 def data @data end |