Class: Redd::Models::LiveUpdate

Inherits:
Model
  • Object
show all
Defined in:
lib/redd/models/live_update.rb

Overview

A live thread update.

Instance Attribute Summary collapse

Attributes inherited from Model

#client

Method Summary

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Redd::Models::Model

Instance Attribute Details

#authorUser (readonly)

Returns the poster of the update.

Returns:

  • (User)

    the poster of the update


35
# File 'lib/redd/models/live_update.rb', line 35

property :author, with: ->(n) { User.new(client, name: n) }

#bodyString (readonly)

Returns the update body.

Returns:

  • (String)

    the update body


19
# File 'lib/redd/models/live_update.rb', line 19

property :body

#body_htmlString (readonly)

Returns the html-rendered update body.

Returns:

  • (String)

    the html-rendered update body


23
# File 'lib/redd/models/live_update.rb', line 23

property :body_html

#created_atTime (readonly)

Returns the post time.

Returns:

  • (Time)

    the post time


39
# File 'lib/redd/models/live_update.rb', line 39

property :created_at, from: :created_utc, with: ->(t) { Time.at(t) }

#embedsArray (readonly)

Returns:

  • (Array)

27
# File 'lib/redd/models/live_update.rb', line 27

property :embeds

#idString (readonly)

Returns the update id.

Returns:

  • (String)

    the update id


11
# File 'lib/redd/models/live_update.rb', line 11

property :id, :required

#mobile_embedsArray (readonly)

Returns:

  • (Array)

31
# File 'lib/redd/models/live_update.rb', line 31

property :mobile_embeds

#nameString (readonly)

Returns the update fullname.

Returns:

  • (String)

    the update fullname


15
# File 'lib/redd/models/live_update.rb', line 15

property :name, default: ->() { "LiveUpdate_#{read_attribute(:id)}" }

#stricken?Boolean (readonly)

Returns whether the update is stricken.

Returns:

  • (Boolean)

    whether the update is stricken


43
# File 'lib/redd/models/live_update.rb', line 43

property :stricken?, from: :stricken