Files
danbooru/app/logical/iqdb/responses/response_201.rb
2014-03-24 13:22:03 -07:00

20 lines
425 B
Ruby

module Iqdb
module Responses
class Response_201 < Base
attr_reader :dbid, :imgid, :score, :width, :height
def initialize(response_string)
@dbid, @imgid, @score, @width, @height = response_string.split(/ /)
@dbid = dbid.to_i
@score = score.to_f
@width = width.to_i
@height = height.to_i
end
def post_id
imgid.to_i(16)
end
end
end
end