Class: MethodDecorators::Decorator

Inherits:
Object
  • Object
show all
Defined in:
lib/method_decorators/decorator.rb

Direct Known Subclasses

Deprecated, Memoize, Precondition, Retry, Within

Constant Summary collapse

@@current_decorators =
[]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.+@Object



11
12
13
# File 'lib/method_decorators/decorator.rb', line 11

def self.+@
  +new
end

.current_decoratorsObject



5
6
7
8
9
# File 'lib/method_decorators/decorator.rb', line 5

def self.current_decorators
  decs = @@current_decorators
  @@current_decorators = []
  decs
end

Instance Method Details

#+@Object



15
16
17
# File 'lib/method_decorators/decorator.rb', line 15

def +@
  @@current_decorators.unshift(self)
end