Class: Geometry::Text
- Inherits:
-
Object
- Object
- Geometry::Text
- Defined in:
- lib/geometry/text.rb
Instance Attribute Summary collapse
-
#content ⇒ String
readonly
The Text‘s textual content.
-
#position ⇒ Point
readonly
bounding box.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(position, content) ⇒ Text
constructor
A new instance of Text.
Constructor Details
#initialize(position, content) ⇒ Text
Returns a new instance of Text.
14 15 16 17 |
# File 'lib/geometry/text.rb', line 14 def initialize(position, content) @position = Point[position] @content = content end |
Instance Attribute Details
#content ⇒ String (readonly)
Returns The Geometry::Text‘s textual content.
12 13 14 |
# File 'lib/geometry/text.rb', line 12 def content @content end |
#position ⇒ Point (readonly)
bounding box
9 10 11 |
# File 'lib/geometry/text.rb', line 9 def position @position end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
19 20 21 |
# File 'lib/geometry/text.rb', line 19 def eql?(other) self.content == other.content end |