Class: Redd::Object::WikiPage
Overview
A submission made in a subreddit.
Instance Attribute Summary collapse
-
#content_html ⇒ Object
readonly
Returns the value of attribute content_html.
-
#content_md ⇒ Object
(also: #content, #body)
readonly
Returns the value of attribute content_md.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#may_revise ⇒ Object
readonly
Returns the value of attribute may_revise.
Attributes inherited from Base
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_html ⇒ Object (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_md ⇒ Object (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 |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
7 8 9 |
# File 'lib/redd/object/wiki_page.rb', line 7 def kind @kind end |
#may_revise ⇒ Object (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_by ⇒ Object
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_date ⇒ Object
22 23 24 |
# File 'lib/redd/object/wiki_page.rb', line 22 def revision_date @created ||= Time.at(@attributes[:revision_date]) end |