class DbClustering::Models::Cluster
Attributes
id[RW]
points[RW]
Public Class Methods
new()
click to toggle source
# File lib/models/cluster.rb, line 7 def initialize @points = [] @id = SecureRandom.urlsafe_base64(3, false) end
Public Instance Methods
add(point)
click to toggle source
# File lib/models/cluster.rb, line 12 def add(point) @points << point point.cluster = self end