Module: Remotable::Nosync

Included in:
Remotable, ActiveRecordExtender, ActiveRecordExtender::ClassMethods
Defined in:
lib/remotable/nosync.rb

Instance Method Summary collapse

Instance Method Details

#nosync(new_value = true) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/remotable/nosync.rb', line 9

def nosync(new_value=true)
  old_value = @nosync
  self.nosync = new_value
  yield
ensure
  @nosync = old_value
end

#nosync!Object



5
6
7
# File 'lib/remotable/nosync.rb', line 5

def nosync!
  self.nosync = true
end

#nosync=(val) ⇒ Object



17
18
19
# File 'lib/remotable/nosync.rb', line 17

def nosync=(val)
  @nosync = val
end

#nosync?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/remotable/nosync.rb', line 25

def nosync?
  @nosync == true
end

#nosync_value?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/remotable/nosync.rb', line 21

def nosync_value?
  !@nosync.nil?
end