Module: Picky::Backends::SQLite::DirectlyManipulable
- Defined in:
- lib/picky/backends/sqlite/directly_manipulable.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#key ⇒ Object
Returns the value of attribute key.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
9 10 11 |
# File 'lib/picky/backends/sqlite/directly_manipulable.rb', line 9 def backend @backend end |
#key ⇒ Object
Returns the value of attribute key.
9 10 11 |
# File 'lib/picky/backends/sqlite/directly_manipulable.rb', line 9 def key @key end |
Class Method Details
.make(backend, array, key) ⇒ Object
11 12 13 14 15 |
# File 'lib/picky/backends/sqlite/directly_manipulable.rb', line 11 def self.make backend, array, key array.extend DirectlyManipulable array.backend = backend array.key = key end |
Instance Method Details
#<<(value) ⇒ Object
17 18 19 20 21 |
# File 'lib/picky/backends/sqlite/directly_manipulable.rb', line 17 def << value super value backend[key] = self self end |
#delete(value) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/picky/backends/sqlite/directly_manipulable.rb', line 29 def delete value value = super value if value backend[key] = self end value end |
#unshift(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/picky/backends/sqlite/directly_manipulable.rb', line 23 def unshift value super value backend[key] = self self end |