Sha256: 0682502a1d286f7b7b81825851a474b28220c346ed06718962673329f3ab1353

Contents?: true

Size: 298 Bytes

Versions: 14

Compression:

Stored size: 298 Bytes

Contents

module DbClustering
  module Models
    class Cluster

      attr_accessor :points, :id

      def initialize
        @points = []
        @id = SecureRandom.urlsafe_base64(3, false)
      end

      def add(point)
        @points << point
        point.cluster = self
      end

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
db_clustering-0.1.17 lib/models/cluster.rb
db_clustering-0.1.16 lib/models/cluster.rb
db_clustering-0.1.15 lib/models/cluster.rb
db_clustering-0.1.14 lib/models/cluster.rb
db_clustering-0.1.13 lib/models/cluster.rb
db_clustering-0.1.12 lib/models/cluster.rb
db_clustering-0.1.11 lib/models/cluster.rb
db_clustering-0.1.10 lib/models/cluster.rb
db_clustering-0.1.9 lib/models/cluster.rb
db_clustering-0.1.8 lib/models/cluster.rb
db_clustering-0.1.7 lib/models/cluster.rb
db_clustering-0.1.6 lib/models/cluster.rb
db_clustering-0.1.5 lib/models/cluster.rb
db_clustering-0.1.4 lib/models/cluster.rb