Class: Tzispa::Annotation
- Inherits:
-
Object
- Object
- Tzispa::Annotation
show all
- Defined in:
- lib/tzispa/annotations/annotation.rb
Constant Summary
collapse
- @@annmutext =
Mutex.new
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
3
4
5
|
# File 'lib/tzispa/annotations/annotation.rb', line 3
def context
@context
end
|
Class Method Details
.+@ ⇒ Object
22
23
24
|
# File 'lib/tzispa/annotations/annotation.rb', line 22
def +@
+new
end
|
.annotations ⇒ Object
rubocop:disable Style/ClassVars
15
16
17
18
19
20
|
# File 'lib/tzispa/annotations/annotation.rb', line 15
def annotations
return __annotations_container if @@annmutext.locked?
synchronize do
__annotations_container
end
end
|
.current_annotations ⇒ Object
26
27
28
|
# File 'lib/tzispa/annotations/annotation.rb', line 26
def current_annotations
annotations.pop annotations.size
end
|
.synchronize ⇒ Object
30
31
32
|
# File 'lib/tzispa/annotations/annotation.rb', line 30
def synchronize
@@annmutext.synchronize { yield }
end
|
Instance Method Details
#+@ ⇒ Object
7
8
9
10
11
|
# File 'lib/tzispa/annotations/annotation.rb', line 7
def +@
self.class.synchronize do
self.class.annotations << self
end
end
|