module Adorn
A threadsafe (on write), cache for storing objects during the request response cycle. User responsibility to provide a serialization | deserialization strategy to set get items from the hash.
ex. setting data in Adorn::Cache
can be acheieved like so: Adorn::Cache.append!
(:foo, serialized_object)
ex. retrieving data in Adorn::Cache
can be acheieved like so: Adorn::Cache #=> serialized_object
Provides decorator descendants with the extensions macro, which returns a module. Useful for endowing decorated object with methods from modules set the modules to extend the decorated object with the :with option.
Adorn::Delegate.extensions
{ {with: [AwesomePower, GreatResponsibility]} }
Provides interface for subclassing decorators. Methods on the decorated object will be passed through the method that is defined using the ::presents method. Every object must provide an object to decorate and a context object, options are passed through having no effect on the presented object. The context object is implicit, when using the helper method presenting provided by Adorn::Helpers
ex. Interface
require ‘adorn’ class WelcomePresernter < Adorn::Presenter
Adorn::Delegate.extensions { {with: [ImportantModule, NeededBehavior]} } presents :welcomer def welcome welomer.english_greeting # => 'Hello there!' end
end