Module: Mongo::Lock::SendWithRaiseMethods

Included in:
Mongo::Lock
Defined in:
lib/mongo-lock/send_with_raise_methods.rb

Instance Method Summary collapse

Instance Method Details

#acquire!(options = {}) ⇒ Object



10
11
12
# File 'lib/mongo-lock/send_with_raise_methods.rb', line 10

def acquire! options = {}
  send_with_raise :acquire, options
end

#extend!(options = {}) ⇒ Object



22
23
24
# File 'lib/mongo-lock/send_with_raise_methods.rb', line 22

def extend! options = {}
  send_with_raise :extend, options
end

#extend_by!(time, options = {}) ⇒ Object



18
19
20
# File 'lib/mongo-lock/send_with_raise_methods.rb', line 18

def extend_by! time, options = {}
  send_with_raise :extend_by, time, options
end

#release!(options = {}) ⇒ Object



14
15
16
# File 'lib/mongo-lock/send_with_raise_methods.rb', line 14

def release! options = {}
  send_with_raise :release, options
end

#send_with_raise(method, *args) ⇒ Object



5
6
7
8
# File 'lib/mongo-lock/send_with_raise_methods.rb', line 5

def send_with_raise method, *args
  args.last[:should_raise] = true
  self.send(method, *args)
end