Sha256: 8200498c810ae58f4b5f9f2eec46de9fa8eb3ebccf6defb794c80d55bbed82a8

Contents?: true

Size: 469 Bytes

Versions: 10

Compression:

Stored size: 469 Bytes

Contents

module Zapata
  class DB
    @records = []
    @locs = []

    class << self
      def create(record)
        loc = record.code.loc

        unless @locs.include?(loc)
          @records << record
          @locs << loc
          record
        end
      end

      def all
        @records
      end

      def destroy_all
        @records = []
      end
    end
  end

  class SaveManager
    def self.clean(name)
      name.to_s.delete('@').to_sym
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
zapata-0.1.6 lib/zapata/db.rb
zapata-0.1.5 lib/zapata/db.rb
zapata-0.1.4 lib/zapata/db.rb
zapata-0.1.3 lib/zapata/db.rb
zapata-0.1.2 lib/zapata/db.rb
zapata-0.1.1 lib/zapata/db.rb
zapata-0.1.0 lib/zapata/db.rb
zapata-0.0.3 lib/zapata/db.rb
zapata-0.0.2 lib/zapata/db.rb
zapata-0.0.1 lib/zapata/db.rb