Class: Rubyhexagon::DeletedPost

Inherits:
Post
  • Object
show all
Defined in:
lib/rubyhexagon/post.rb

Overview

This class holds post information, fetched from e621, and gives access in a more Ruby like manner. This is only for deleted posts.

Author:

  • Maxine Michalski

Since:

  • 1.0.0

Instance Attribute Summary collapse

Attributes inherited from Post

#artists, #author, #children, #created_at, #description, #favorites, #id, #image, #md5, #parent, #preview, #rating, #sample, #score, #sources, #status, #tag_names

Instance Method Summary collapse

Methods inherited from Post

#==, #favorite!, #show, #show!, #tags, #test, #unfavorite!, #vote!, #votedown!, #voteup!

Constructor Details

#initialize(id, delreason) ⇒ Object

Initializer for DeletedPost.

Parameters:

  • id (Integer)

    post id on e621

  • delreason (String)

    reason of deletion

Author:

  • Maxine Michalski

Since:

  • 1.0.0



303
304
305
306
# File 'lib/rubyhexagon/post.rb', line 303

def initialize(id, delreason)
  super(id)
  @reason = delreason
end

Instance Attribute Details

#reasonString (readonly)

Returns deletion reason, when available.

Returns:

  • (String)

    deletion reason, when available

Since:

  • 1.0.0



293
294
295
# File 'lib/rubyhexagon/post.rb', line 293

def reason
  @reason
end