Class: Geom::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/geom/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#angleObject

Returns the value of attribute angle.



4
5
6
# File 'lib/geom/connection.rb', line 4

def angle
  @angle
end

#pointObject

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

Returns:

  • (Boolean)


10
11
12
# File 'lib/geom/connection.rb', line 10

def equal?(other)
  other.point == @point && other.angle == @angle
end