Class: ReactiveRecord::SyncWrapper
- Inherits:
-
Object
- Object
- ReactiveRecord::SyncWrapper
- Defined in:
- lib/reactive_record/sync_wrapper.rb
Instance Method Summary collapse
-
#initialize(model) ⇒ SyncWrapper
constructor
A new instance of SyncWrapper.
- #where(opts = {}) ⇒ Object
Constructor Details
#initialize(model) ⇒ SyncWrapper
Returns a new instance of SyncWrapper.
5 6 7 |
# File 'lib/reactive_record/sync_wrapper.rb', line 5 def initialize(model) @model = model end |
Instance Method Details
#where(opts = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/reactive_record/sync_wrapper.rb', line 9 def where(opts = {}) opts.each do |attr, value| return false unless @model.send(attr) == value end true end |