Module: Nosync

Included in:
Milestone, Ticket
Defined in:
app/concerns/nosync.rb

Instance Method Summary collapse

Instance Method Details

#nosyncObject



3
4
5
6
7
8
9
10
11
# File 'app/concerns/nosync.rb', line 3

def nosync
  value = nosync?
  begin
    self.nosync = true
    yield
  ensure
    self.nosync = value
  end
end

#nosync=(value) ⇒ Object



13
14
15
# File 'app/concerns/nosync.rb', line 13

def nosync=(value)
  @nosync = value
end

#nosync?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/concerns/nosync.rb', line 17

def nosync?
  !!@nosync
end