lib/ahub/answer.rb in ahub-0.3.2 vs lib/ahub/answer.rb in ahub-0.4.0

- old
+ new

@@ -1,17 +1,16 @@ module Ahub class Answer - extend Ahub::APIHelpers - include Ahub::ClassHelpers + include Ahub::APIResource def self.create(question_id:, body:, username:, password:) url = "#{Ahub::DOMAIN}/services/v2/question/#{question_id}/answer.json" create_resource(url: url, payload: {body: body}, headers: headers(username: username, password: password)) end def initialize(attrs) - super(attrs) + super @author = Ahub::User.new(attrs[:author]) end def user @author