Class: Officer::Lock

Inherits:
Object
  • Object
show all
Defined in:
lib/officer/lock_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Lock

Returns a new instance of Lock.



13
14
15
16
# File 'lib/officer/lock_store.rb', line 13

def initialize name
  @name = name
  @queue = LockQueue.new
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/officer/lock_store.rb', line 10

def name
  @name
end

#queueObject (readonly)

Returns the value of attribute queue.



11
12
13
# File 'lib/officer/lock_store.rb', line 11

def queue
  @queue
end