Class: Patchstream::ClassMethods::PatchStreams
- Inherits:
-
Object
- Object
- Patchstream::ClassMethods::PatchStreams
- Defined in:
- lib/patchstream.rb
Instance Method Summary collapse
- #add(stream) ⇒ Object
- #emit_create(record, &block) ⇒ Object
- #emit_destroy(record, &block) ⇒ Object
- #emit_update(record, &block) ⇒ Object
Instance Method Details
#add(stream) ⇒ Object
32 33 34 |
# File 'lib/patchstream.rb', line 32 def add(stream) streams << stream end |
#emit_create(record, &block) ⇒ Object
36 37 38 |
# File 'lib/patchstream.rb', line 36 def emit_create(record, &block) emit(build_create_patch(record), &block) end |
#emit_destroy(record, &block) ⇒ Object
44 45 46 |
# File 'lib/patchstream.rb', line 44 def emit_destroy(record, &block) emit(build_destroy_patch(record), &block) end |
#emit_update(record, &block) ⇒ Object
40 41 42 |
# File 'lib/patchstream.rb', line 40 def emit_update(record, &block) emit_all(build_update_patches(record), &block) end |