Class: Jekyll::ActivityPub::Notifier::PseudoObject

Inherits:
Struct
  • Object
show all
Defined in:
lib/jekyll/activity_pub/notifier.rb

Overview

An struct that behaves like a page

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



26
27
28
# File 'lib/jekyll/activity_pub/notifier.rb', line 26

def data
  @data
end

#relative_pathObject

Returns the value of attribute relative_path

Returns:

  • (Object)

    the current value of relative_path



26
27
28
# File 'lib/jekyll/activity_pub/notifier.rb', line 26

def relative_path
  @relative_path
end

#siteObject

Returns the value of attribute site

Returns:

  • (Object)

    the current value of site



26
27
28
# File 'lib/jekyll/activity_pub/notifier.rb', line 26

def site
  @site
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



26
27
28
# File 'lib/jekyll/activity_pub/notifier.rb', line 26

def url
  @url
end

Instance Method Details

#dateObject



31
32
33
34
35
# File 'lib/jekyll/activity_pub/notifier.rb', line 31

def date
  @date ||= Time.parse(data['published'])
rescue StandardError
  nil
end

#destination(_) ⇒ Object



27
28
29
# File 'lib/jekyll/activity_pub/notifier.rb', line 27

def destination(_)
  site.in_dest_dir(relative_path)
end

#updated_atTime?

Returns:

  • (Time, nil)


38
39
40
41
42
# File 'lib/jekyll/activity_pub/notifier.rb', line 38

def updated_at
  @updated_at ||= Time.parse(data['updated'])
rescue StandardError
  nil
end