Class: Geometry::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/geometry/text.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(position, content) ⇒ Text

Returns a new instance of Text.



19
20
21
22
# File 'lib/geometry/text.rb', line 19

def initialize(position, content)
	@position = Point[position]
	@content = content
end

Instance Attribute Details

#contentString (readonly)

Returns The Geometry::Text‘s textual content.

Returns:



17
18
19
# File 'lib/geometry/text.rb', line 17

def content
  @content
end

#optionsObject



7
8
9
10
# File 'lib/geometry/text.rb', line 7

def options
	@options = {} if !@options
	@options
end

#positionPoint (readonly)

bounding box

Returns:



14
15
16
# File 'lib/geometry/text.rb', line 14

def position
  @position
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


24
25
26
# File 'lib/geometry/text.rb', line 24

def eql?(other)
	self.content == other.content
end