Sha256: 5d9b0be86cc3cbb14ed5deed005db137c0a9305bef5a9cda811fb21b29fe15b3

Contents?: true

Size: 385 Bytes

Versions: 12

Compression:

Stored size: 385 Bytes

Contents

module Spina
  class Part

    class << self

      def all
        ::Spina::PARTS
      end

      def register(*parts)
        parts.each do |part|
          unregister(part)
          all << part
        end
      end
      
      def unregister(part)
        all.delete_if do |registered_part|
          registered_part.name == part.name
        end
      end

    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spina-2.12.0 lib/spina/part.rb
spina-2.11.0 lib/spina/part.rb
spina-2.10.0 lib/spina/part.rb
spina-2.9.1 lib/spina/part.rb
spina-2.9.0 lib/spina/part.rb
spina-2.8.1 lib/spina/part.rb
spina-2.8.0 lib/spina/part.rb
spina-2.7.0 lib/spina/part.rb
spina-2.6.2 lib/spina/part.rb
spina-2.6.1 lib/spina/part.rb
spina-2.6.0 lib/spina/part.rb
spina-2.5.0 lib/spina/part.rb