Sha256: 9d37526a44061d5775d9e617aeccb04735eec78fdb3b69c776c468cbf7d28205

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

# a primitive class that incapsulate
# a rectangle on screen, with position
# (top, left) and size (width, height)
class Rect
  attr_reader :top, :left, :width, :height

  # create a rectangle with top, left, width and height
  # opts(Hash):: a hash with keys (top, left, width, height)
  def initialize(opts = {})
    @top = opts[:top]
    @left = opts[:left]
    @width = opts[:width]
    @height = opts[:height]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amun-0.2.0 lib/amun/primitives/rect.rb