Sha256: 89d74982bc7c2fae7d03b8b9e2d80008f2d04b7b7f4ddbfc6a0e1226244c5229
Contents?: true
Size: 445 Bytes
Versions: 21
Compression:
Stored size: 445 Bytes
Contents
module GridGenerator class BaseLine def initialize(x1:, y1:, x2:, y2:) @x1, @y1 = x1, y1 @x2, @y2 = x2, y2 end attr_reader :x1, :y1, :x2, :y2 def ==(other) self.x1 == other.x1 && self.y1 == other.y1 && self.x2 == other.x2 && self.y2 == other.y2 end def as_json { "x1" => x1, "y1" => y1, "x2" => x2, "y2" => y2 } end end end
Version data entries
21 entries across 21 versions & 1 rubygems