gitlab-org--gitlab-foss/lib/gitlab/diff/image_point.rb

24 lines
383 B
Ruby
Raw Normal View History

2017-10-07 04:25:17 +00:00
module Gitlab
module Diff
class ImagePoint
attr_reader :width, :height, :x, :y
2018-07-04 14:02:01 +00:00
def initialize(width, height, new_x, new_y)
2017-10-07 04:25:17 +00:00
@width = width
@height = height
2018-07-04 14:02:01 +00:00
@x = new_x
@y = new_y
2017-10-07 04:25:17 +00:00
end
def to_h
{
width: width,
height: height,
x: x,
y: y
}
end
end
end
end