lib/ahub/answer.rb in ahub-0.2.0 vs lib/ahub/answer.rb in ahub-0.3.1
- old
+ new
@@ -7,15 +7,11 @@
url = "#{Ahub::DOMAIN}/services/v2/question/#{question_id}/answer.json"
create_resource(url: url, payload: {body: body}, headers: headers(username: username, password: password))
end
- attr_reader :body, :body_as_html, :author
-
def initialize(attrs)
- @id = attrs[:id]
- @body = attrs[:body]
- @body_as_html = attrs[:bodyAsHTML]
+ super(attrs)
@author = Ahub::User.new(attrs[:author])
end
def user
@author