Sha256: 9725168adc6a73b49f0a68a4e7d3173c867992d86848e5621c1b4c161670c9a1
Contents?: true
Size: 839 Bytes
Versions: 2
Compression:
Stored size: 839 Bytes
Contents
module Restfulie module Server module ActionView module TemplateHandlers class Tokamak < ::ActionView::TemplateHandler include ::ActionView::TemplateHandlers::Compilable def compile(template) "@restfulie_type_helpers = Restfulie::Client::HTTP::RequestMarshaller.content_type_for(self.response.content_type).helper; " + "extend @restfulie_type_helpers; " + "extend Restfulie::Server::ActionView::Helpers; " + "code_block = lambda { #{template.source} };" + "builder = code_block.call; " + "self.response.headers['Link'] = Restfulie::Common::Representation::Links.extract_link_header(builder.links) if builder.respond_to?(:links); " + "builder.to_s" end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
restfulie-0.9.3 | lib/restfulie/server/action_view/template_handlers/tokamak.rb |
restfulie-0.9.1 | lib/restfulie/server/action_view/template_handlers/tokamak.rb |