Sha256: eb2893501fdf5035e2470b7ee7700e568f47b76c005b680e6c51e20c2468d8f2
Contents?: true
Size: 658 Bytes
Versions: 40
Compression:
Stored size: 658 Bytes
Contents
module Test module Ox class Shape include HasProps attr_accessor :bounds attr_accessor :color attr_accessor :border, :border_color def initialize(left, top, wide, high, color=nil) @bounds = [[left, top], [left + wide, top + high]] @color = color @border = 1 @border_color = :black end def left @bounds[0][0] end def top @bounds[0][1] end def width @bounds[1][0] - @bounds[0][0] end def height @bounds[1][1] - @bounds[0][1] end end # Shape end # Ox end # Test
Version data entries
40 entries across 40 versions & 1 rubygems