Class: Geom::Connection
- Inherits:
-
Object
- Object
- Geom::Connection
- Defined in:
- lib/geom/connection.rb
Instance Attribute Summary collapse
-
#angle ⇒ Object
Returns the value of attribute angle.
-
#point ⇒ Object
Returns the value of attribute point.
Instance Method Summary collapse
- #== ⇒ Object
- #equal?(other) ⇒ Boolean
-
#initialize(point, angle) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(point, angle) ⇒ Connection
Returns a new instance of Connection.
5 6 7 8 |
# File 'lib/geom/connection.rb', line 5 def initialize(point,angle) @point = point @angle = angle end |
Instance Attribute Details
#angle ⇒ Object
Returns the value of attribute angle.
4 5 6 |
# File 'lib/geom/connection.rb', line 4 def angle @angle end |
#point ⇒ Object
Returns the value of attribute point.
4 5 6 |
# File 'lib/geom/connection.rb', line 4 def point @point end |
Instance Method Details
#== ⇒ Object
3 |
# File 'lib/geom/connection.rb', line 3 alias_method(:==, :equal?) |
#equal?(other) ⇒ Boolean
10 11 12 |
# File 'lib/geom/connection.rb', line 10 def equal?(other) other.point == @point && other.angle == @angle end |