Welcome to mirror list, hosted at ThFree Co, Russian Federation.

image_point.rb « diff « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3ce032f8e27f8ebbebe08b737d93136b67da26c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

module Gitlab
  module Diff
    class ImagePoint
      attr_reader :width, :height, :x, :y

      def initialize(width, height, new_x, new_y)
        @width = width
        @height = height
        @x = new_x
        @y = new_y
      end

      def to_h
        {
          width: width,
          height: height,
          x: x,
          y: y
        }
      end
    end
  end
end