class

Planeta::FeedEntry

Inherits JSON::Serializable < Comparable < Reference < Object

Represents a single blog post or article from a feed

This class encapsulates all the data for a feed entry with proper type safety and convenience methods for display and comparison.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

<=>(other : self) : Int32

Comparison method for sorting (newest first by default)

Source
author

Author of the blog post (optional)

Source
author=(author : String | Nil)

Author of the blog post (optional)

Source
display_author

Returns the author name for display, with fallback to "Unknown"

Source
display_summary

Returns the summary for display, with fallback to empty string

Source
feed_title

Title of the feed this entry belongs to (required)

Source
feed_title=(feed_title : String)

Title of the feed this entry belongs to (required)

Source
feed_title?

Title of the feed this entry belongs to (required)

Source
has_content?

Checks if this entry has meaningful content

Source
id

Unique identifier for this entry (required)

Source
id=(id : String)

Unique identifier for this entry (required)

Source
id?

Unique identifier for this entry (required)

Source
matches_query?(query : String) : Bool

Returns true if this entry matches the search query

Source
newer_than?(time : Time) : Bool

Returns true if this entry is newer than the specified time

Source
published

When the post was originally published

Source
published=(published : Time)

When the post was originally published

Source
safe_author_website

Returns the author's website URL (base URL extracted from feed_link)

Source
summary

Summary or excerpt of the blog post (optional)

Source
summary=(summary : String | Nil)

Summary or excerpt of the blog post (optional)

Source
time_ago

Returns the time elapsed since publication in human-readable format

Source
title

Title of the blog post (required)

Source
title=(title : String)

Title of the blog post (required)

Source
title?

Title of the blog post (required)

Source
to_s(io : IO) : Nil

String representation for debugging

Source
truncated_summary(max_length : Int32) : String

Returns a truncated version of the summary for display

Source
updated

When the post was last updated

Source
updated=(updated : Time)

When the post was last updated

Source