Class: Rack::AllocationStats::Formatters::HTML
- Inherits:
-
Base
- Object
- Base
- Rack::AllocationStats::Formatters::HTML
- Defined in:
- lib/rack/allocation_stats/formatters/html.rb
Overview
Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0, found in the LICENSE file.
Instance Method Summary collapse
Instance Method Details
#format ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rack/allocation_stats/formatters/html.rb', line 5 def format interactive_dir = File.join(__dir__, "..", "interactive") index_html_erb = ERB.new(File.read(File.join(interactive_dir, "index.html.erb"))) jquery_min_js = File.read(File.join(interactive_dir, "jquery-2.0.3.min.js")) jquery_ui_min_js = File.read(File.join(interactive_dir, "jquery-ui-1.10.3.custom.min.js")) underscore_min_js = File.read(File.join(interactive_dir, "underscore-min.js")) allocations_js_erb = ERB.new(File.read(File.join(interactive_dir, "allocations.js.erb"))) allocations_js = allocations_js_erb.result(binding) interactive_js = File.read(File.join(interactive_dir, "interactive.js")) jquery_ui_min_css = File.read(File.join(interactive_dir, "jquery-ui-1.10.3.custom.min.css")) style_css = File.read(File.join(interactive_dir, "style.css")) allocating_gems = ["no gems allocated any objects"] html_body = index_html_erb.result(binding) return [html_body] end |