Class: Rubyoverflow::Answer
Instance Attribute Summary collapse
-
#accepted ⇒ Object
readonly
Returns the value of attribute accepted.
-
#answer_comments_url ⇒ Object
readonly
Returns the value of attribute answer_comments_url.
-
#answer_id ⇒ Object
readonly
Returns the value of attribute answer_id.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#community_owned ⇒ Object
readonly
Returns the value of attribute community_owned.
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#down_vote_count ⇒ Object
readonly
Returns the value of attribute down_vote_count.
-
#last_activity_date ⇒ Object
readonly
Returns the value of attribute last_activity_date.
-
#last_edit_date ⇒ Object
readonly
Returns the value of attribute last_edit_date.
-
#locked_date ⇒ Object
readonly
Returns the value of attribute locked_date.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#question_id ⇒ Object
readonly
Returns the value of attribute question_id.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#up_vote_count ⇒ Object
readonly
Returns the value of attribute up_vote_count.
-
#view_count ⇒ Object
readonly
Returns the value of attribute view_count.
Instance Method Summary collapse
-
#get_comments(parameters = {}) ⇒ Object
Gets the comments made on the answer.
-
#initialize(hash, request_path = '') ⇒ Answer
constructor
A new instance of Answer.
Methods inherited from Base
change_end_point, client, convert_if_array, convert_to_id_list, #find_parse_querystring, request, #request
Constructor Details
#initialize(hash, request_path = '') ⇒ Answer
Returns a new instance of Answer.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rubyoverflow/answer.rb', line 7 def initialize(hash, request_path = '') dash = AnswerDash.new hash @answer_id = dash.answer_id @accepted = dash.accepted @answer_comments_url = dash.answer_comments_url @question_id = dash.question_id @locked_date = dash.locked_date @owner = User.new dash.owner @creation_date = dash.creation_date @last_edit_date = dash.last_edit_date @last_activity_date = dash.last_activity_date @up_vote_count = dash.up_vote_count @down_vote_count = dash.down_vote_count @view_count = dash.view_count @score = dash.score @community_owned = dash.community_owned @title = dash.title @body = dash.body @comments = Comments.new dash.comments if dash.comments end |
Instance Attribute Details
#accepted ⇒ Object (readonly)
Returns the value of attribute accepted.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def accepted @accepted end |
#answer_comments_url ⇒ Object (readonly)
Returns the value of attribute answer_comments_url.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def answer_comments_url @answer_comments_url end |
#answer_id ⇒ Object (readonly)
Returns the value of attribute answer_id.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def answer_id @answer_id end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def body @body end |
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def comments @comments end |
#community_owned ⇒ Object (readonly)
Returns the value of attribute community_owned.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def community_owned @community_owned end |
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def creation_date @creation_date end |
#down_vote_count ⇒ Object (readonly)
Returns the value of attribute down_vote_count.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def down_vote_count @down_vote_count end |
#last_activity_date ⇒ Object (readonly)
Returns the value of attribute last_activity_date.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def last_activity_date @last_activity_date end |
#last_edit_date ⇒ Object (readonly)
Returns the value of attribute last_edit_date.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def last_edit_date @last_edit_date end |
#locked_date ⇒ Object (readonly)
Returns the value of attribute locked_date.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def locked_date @locked_date end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def owner @owner end |
#question_id ⇒ Object (readonly)
Returns the value of attribute question_id.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def question_id @question_id end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def score @score end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def title @title end |
#up_vote_count ⇒ Object (readonly)
Returns the value of attribute up_vote_count.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def up_vote_count @up_vote_count end |
#view_count ⇒ Object (readonly)
Returns the value of attribute view_count.
3 4 5 |
# File 'lib/rubyoverflow/answer.rb', line 3 def view_count @view_count end |