Sha256: 82be5f08b3dcc560da5ad0e74f4a9f69faf0505fac3088767a7c0e69dfbc3c9c

Contents?: true

Size: 433 Bytes

Versions: 5

Compression:

Stored size: 433 Bytes

Contents

require_relative 'point'

module Geometry

	class Text
		
		# @return [Point]   The point located in the top left corner of {Text}'s
		# bounding box
		attr_reader :position

		# @return [String]  The {Text}'s textual content
		attr_reader :content
		
		def initialize(position, content)
			@position = Point[position]
			@content = content
		end
		
		def eql?(other)
			self.content == other.content
		end
		alias :== :eql?
	end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
geometry-in-ruby-0.0.1 lib/geometry/text.rb
aurora-geometry-0.0.5 lib/geometry/text.rb
aurora-geometry-0.0.4 lib/aurora-geometry/text.rb
aurora-geometry-0.0.3 lib/aurora-geometry/text.rb
aurora-geometry-0.0.2 lib/geometry/text.rb