2018-11-05 23:45:35 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-07 00:25:17 -04:00
|
|
|
module Gitlab
|
|
|
|
module Diff
|
|
|
|
class ImagePoint
|
|
|
|
attr_reader :width, :height, :x, :y
|
|
|
|
|
2018-07-04 10:02:01 -04:00
|
|
|
def initialize(width, height, new_x, new_y)
|
2017-10-07 00:25:17 -04:00
|
|
|
@width = width
|
|
|
|
@height = height
|
2018-07-04 10:02:01 -04:00
|
|
|
@x = new_x
|
|
|
|
@y = new_y
|
2017-10-07 00:25:17 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def to_h
|
|
|
|
{
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
x: x,
|
|
|
|
y: y
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|