Class: Pageflow::EntriesFeed Private

Inherits:
Struct
  • Object
show all
Defined in:
app/models/pageflow/entries_feed.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#custom_urlObject

Returns the value of attribute custom_url

Returns:

  • (Object)

    the current value of custom_url



3
4
5
# File 'app/models/pageflow/entries_feed.rb', line 3

def custom_url
  @custom_url
end

#entriesObject

Returns the value of attribute entries

Returns:

  • (Object)

    the current value of entries



3
4
5
# File 'app/models/pageflow/entries_feed.rb', line 3

def entries
  @entries
end

#localeObject

Returns the value of attribute locale

Returns:

  • (Object)

    the current value of locale



3
4
5
# File 'app/models/pageflow/entries_feed.rb', line 3

def locale
  @locale
end

#root_urlObject

Returns the value of attribute root_url

Returns:

  • (Object)

    the current value of root_url



3
4
5
# File 'app/models/pageflow/entries_feed.rb', line 3

def root_url
  @root_url
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



3
4
5
# File 'app/models/pageflow/entries_feed.rb', line 3

def title
  @title
end

Class Method Details

.for(site:, locale:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
16
17
# File 'app/models/pageflow/entries_feed.rb', line 9

def for(site:, locale:)
  new(
    site.title.presence || site.host,
    locale,
    site.custom_feed_url&.gsub(':locale', locale),
    site.canonical_entry_url_prefix&.gsub(':locale', locale),
    find_entries(site, locale)
  )
end

Instance Method Details

#updated_atObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
# File 'app/models/pageflow/entries_feed.rb', line 4

def updated_at
  entries.map(&:published_at).max
end