Class: ReactiveRecord::SyncWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/reactive_record/sync_wrapper.rb

Instance Method Summary collapse

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