Class: Redd::Object::WikiPage

Inherits:
Base
  • Object
show all
Defined in:
lib/redd/object/wiki_page.rb

Overview

A submission made in a subreddit.

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes, #client

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, #initialize

Constructor Details

This class inherits a constructor from Redd::Base

Instance Attribute Details

#content_htmlObject (readonly)

Returns the value of attribute content_html.



10
11
12
# File 'lib/redd/object/wiki_page.rb', line 10

def content_html
  @content_html
end

#content_mdObject (readonly) Also known as: content, body

Returns the value of attribute content_md.



9
10
11
# File 'lib/redd/object/wiki_page.rb', line 9

def content_md
  @content_md
end

#kindObject (readonly)

Returns the value of attribute kind.



7
8
9
# File 'lib/redd/object/wiki_page.rb', line 7

def kind
  @kind
end

#may_reviseObject (readonly)

Returns the value of attribute may_revise.



8
9
10
# File 'lib/redd/object/wiki_page.rb', line 8

def may_revise
  @may_revise
end

Instance Method Details

#revision_byObject

HACK



16
17
18
19
20
# File 'lib/redd/object/wiki_page.rb', line 16

def revision_by
  @revision_by ||= client.send(
    :object_from_body, @attributes[:revision_by]
  )
end

#revision_dateObject



22
23
24
# File 'lib/redd/object/wiki_page.rb', line 22

def revision_date
  @created ||= Time.at(@attributes[:revision_date])
end