lib/pilha/stack_overflow/answer.rb in pilha-0.1.6 vs lib/pilha/stack_overflow/answer.rb in pilha-0.1.7

- old
+ new

@@ -6,11 +6,10 @@ def_delegators :@struct, :answer_id, :accepted, :answer_comments_url, :question_id, :owner, :creation_date, :last_activity_date, :up_vote_count, :down_vote_count, :view_count, :score, :community_owned, :title, :comments class << self - attr_reader :client def find(id, options = {}) request('/answers/:id', id, options).answers.first end @@ -28,13 +27,9 @@ parse_with_class(answer, 'owner', User) end parse_with_class(response, 'answers', Answer) OpenStruct.new response end - end - - def initialize(hash) - @struct = OpenStruct.new hash end def id @struct.answer_id end