Class: Rubyoverflow::Revision
- Inherits:
-
Object
- Object
- Rubyoverflow::Revision
- Defined in:
- lib/rubyoverflow/revision.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#is_question ⇒ Object
readonly
Returns the value of attribute is_question.
-
#is_rollback ⇒ Object
readonly
Returns the value of attribute is_rollback.
-
#last_body ⇒ Object
readonly
Returns the value of attribute last_body.
-
#last_tags ⇒ Object
readonly
Returns the value of attribute last_tags.
-
#last_title ⇒ Object
readonly
Returns the value of attribute last_title.
-
#post_id ⇒ Object
readonly
Returns the value of attribute post_id.
-
#revision_guid ⇒ Object
readonly
Returns the value of attribute revision_guid.
-
#revision_number ⇒ Object
readonly
Returns the value of attribute revision_number.
-
#revision_type ⇒ Object
readonly
Returns the value of attribute revision_type.
-
#set_community_wiki ⇒ Object
readonly
Returns the value of attribute set_community_wiki.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(hash, request_path = '') ⇒ Revision
constructor
A new instance of Revision.
Constructor Details
#initialize(hash, request_path = '') ⇒ Revision
Returns a new instance of Revision.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/rubyoverflow/revision.rb', line 20 def initialize(hash, request_path = '') dash = RevisionDash.new hash @body = dash.body @comment = dash.comment @creation_date = dash.creation_date @is_question = dash.is_question @is_rollback = dash.is_rollback @last_body = dash.last_body @last_title = dash.last_title @last_tags = dash. @revision_guid = dash.revision_guid @revision_number = dash.revision_number @tags = dash. @title = dash.title @revision_type = dash.revision_type @set_community_wiki = dash.set_community_wiki @user = User.new dash.user if dash.user @post_id = dash.post_id end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/rubyoverflow/revision.rb', line 3 def body @body end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
4 5 6 |
# File 'lib/rubyoverflow/revision.rb', line 4 def comment @comment end |
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
5 6 7 |
# File 'lib/rubyoverflow/revision.rb', line 5 def creation_date @creation_date end |
#is_question ⇒ Object (readonly)
Returns the value of attribute is_question.
6 7 8 |
# File 'lib/rubyoverflow/revision.rb', line 6 def is_question @is_question end |
#is_rollback ⇒ Object (readonly)
Returns the value of attribute is_rollback.
7 8 9 |
# File 'lib/rubyoverflow/revision.rb', line 7 def is_rollback @is_rollback end |
#last_body ⇒ Object (readonly)
Returns the value of attribute last_body.
8 9 10 |
# File 'lib/rubyoverflow/revision.rb', line 8 def last_body @last_body end |
#last_tags ⇒ Object (readonly)
Returns the value of attribute last_tags.
10 11 12 |
# File 'lib/rubyoverflow/revision.rb', line 10 def @last_tags end |
#last_title ⇒ Object (readonly)
Returns the value of attribute last_title.
9 10 11 |
# File 'lib/rubyoverflow/revision.rb', line 9 def last_title @last_title end |
#post_id ⇒ Object (readonly)
Returns the value of attribute post_id.
18 19 20 |
# File 'lib/rubyoverflow/revision.rb', line 18 def post_id @post_id end |
#revision_guid ⇒ Object (readonly)
Returns the value of attribute revision_guid.
11 12 13 |
# File 'lib/rubyoverflow/revision.rb', line 11 def revision_guid @revision_guid end |
#revision_number ⇒ Object (readonly)
Returns the value of attribute revision_number.
12 13 14 |
# File 'lib/rubyoverflow/revision.rb', line 12 def revision_number @revision_number end |
#revision_type ⇒ Object (readonly)
Returns the value of attribute revision_type.
15 16 17 |
# File 'lib/rubyoverflow/revision.rb', line 15 def revision_type @revision_type end |
#set_community_wiki ⇒ Object (readonly)
Returns the value of attribute set_community_wiki.
16 17 18 |
# File 'lib/rubyoverflow/revision.rb', line 16 def set_community_wiki @set_community_wiki end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
13 14 15 |
# File 'lib/rubyoverflow/revision.rb', line 13 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
14 15 16 |
# File 'lib/rubyoverflow/revision.rb', line 14 def title @title end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
17 18 19 |
# File 'lib/rubyoverflow/revision.rb', line 17 def user @user end |