Class: Heroku::Nav::Footer
Instance Method Summary collapse
Methods inherited from Base
api_url, #call, #can_insert?, fetch, html, #initialize, #refresh, resource, resource_url, retry_upto
Constructor Details
This class inherits a constructor from Heroku::Nav::Base
Instance Method Details
#insert! ⇒ Object
96 97 98 99 100 101 102 |
# File 'lib/heroku/nav.rb', line 96 def insert! if @nav['html'] @body.gsub!(/(<head>)/i, "\\1<link href='#{self.class.api_url}/footer.css' media='all' rel='stylesheet' type='text/css' />") @body.gsub!(/(<\/body>)/i, "#{@nav['html']}\\1") @headers['Content-Length'] = Rack::Utils.bytesize(@body).to_s end end |