Fragment client
A Ruby gem that provides an interface to the fragment_server for easy use in web apps. The client's main responsibility is to construct requests and handle caching of response strings.
Usage
The fragment client provides an easy method to fetch snippets of markup from the fragment server. E.G.
client = FragmentClient.new('app_name')
client.fetch('footer')
client.fetch('navigation', )
options
is a hash of values used to construct the API query. The default values are listed below:
{
has_log_in: true, # true || false
logged_in: false, # true || false
logo: 'red' # 'red' || 'black'
}
*currently, only the navigation method has options
Caching
The fragment client attempts to cache responses wherever possible.