Class: Heroku::Nav::Internal
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
api_url, #call, #can_insert?, fetch, html, #initialize, #refresh, resource_url, retry_upto
Constructor Details
This class inherits a constructor from Heroku::Nav::Base
Class Method Details
.resource ⇒ Object
106 107 108 |
# File 'lib/heroku/nav.rb', line 106 def self.resource "internal.json" end |
Instance Method Details
#insert! ⇒ Object
109 110 111 112 113 114 115 116 117 |
# File 'lib/heroku/nav.rb', line 109 def insert! if @nav['head'] @body.gsub!(/(<head>)/i, "\\1#{@nav['head']}") end if @nav['body'] @body.gsub!(/(<\/body>)/i, "#{@nav['body']}\\1") end @headers['Content-Length'] = Rack::Utils.bytesize(@body).to_s end |