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.0.7 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.6 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.5 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.4 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.3 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.0 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.0pre6 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.0pre5 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.0pre3 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.0pre2 lib/picky/backends/sqlite/directly_manipulable.rb
picky-4.0.0pre1 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.16 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.15 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.14 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.13 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.12 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.11 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.10 lib/picky/backends/sqlite/directly_manipulable.rb
picky-3.6.9 lib/picky/backends/sqlite/directly_manipulable.rb