Class: Blacksheep::ActionDecorator
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Blacksheep::ActionDecorator
- Defined in:
- lib/blacksheep/action_decorator.rb
Direct Known Subclasses
Decorators::DefaultErrorHandler, Decorators::JsonTransformer, Decorators::Localizer, Decorators::ResultMatcher
Instance Method Summary collapse
-
#__class__ ⇒ Class
Access to the decorators class - since original class is overwritten to return the model class.
- #class ⇒ Object
-
#decorators_chain ⇒ type
Just for curiosity - get the decorators chain.
Instance Method Details
#__class__ ⇒ Class
Access to the decorators class - since original class is overwritten to return the model class.
11 |
# File 'lib/blacksheep/action_decorator.rb', line 11 alias_method :__class__, :class |
#class ⇒ Object
13 14 15 |
# File 'lib/blacksheep/action_decorator.rb', line 13 def class __getobj__.class end |
#decorators_chain ⇒ type
Just for curiosity - get the decorators chain
21 22 23 24 25 26 |
# File 'lib/blacksheep/action_decorator.rb', line 21 def decorators_chain decorated = __getobj__ chain = decorated.kind_of?(Blacksheep::ActionDecorator) ? decorated.decorators_chain : [ decorated.class ] chain.unshift(self.__class__) end |