Sha256: 06c1189ce6171dd9353a8439f2b1c1981c4f715cdcfeb53c55f90de9ebc5e08e

Contents?: true

Size: 670 Bytes

Versions: 121

Compression:

Stored size: 670 Bytes

Contents

module Picky

  module Backends

    class SQLite

      module DirectlyManipulable

        attr_accessor :backend, :key

        def self.make backend, array, key
          array.extend DirectlyManipulable
          array.backend = backend
          array.key     = key
        end

        def << value
          super value
          backend[key] = self
          self
        end

        def unshift value
          super value
          backend[key] = self
          self
        end

        def delete value
          value = super value
          if value
            backend[key] = self
          end
          value
        end
      end

    end

  end

end

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
picky-4.31.3 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.31.2 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.31.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.31.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.30.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.29.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.28.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.27.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.27.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.26.2 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.26.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.26.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.25.3 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.25.2 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.25.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.25.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.24.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.23.2 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.23.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.23.0 lib/picky/backends/sqlite/directly_manipulable.rb