Class: MwrapRack::EachAt
- Inherits:
-
Struct
- Object
- Struct
- MwrapRack::EachAt
- Includes:
- HtmlResponse
- Defined in:
- lib/mwrap_rack.rb
Overview
:nodoc:
Constant Summary collapse
- HEADER =
'<tr><th>size</th><th>generation</th></tr>'
Instance Attribute Summary collapse
-
#loc ⇒ Object
Returns the value of attribute loc.
Instance Method Summary collapse
Methods included from HtmlResponse
Instance Attribute Details
#loc ⇒ Object
Returns the value of attribute loc
76 77 78 |
# File 'lib/mwrap_rack.rb', line 76 def loc @loc end |
Instance Method Details
#each {|-"<html><head><title>#{t}</title></head>" \ "<body><h1>live allocations at #{t}</h1>" \ "<h2>Current generation: #{GC.count}</h2>\n<table>#{HEADER}")| ... } ⇒ Object
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mwrap_rack.rb', line 80 def each t = loc.name.encode(xml: :text) yield(-"<html><head><title>#{t}</title></head>" \ "<body><h1>live allocations at #{t}</h1>" \ "<h2>Current generation: #{GC.count}</h2>\n<table>#{HEADER}") loc.each do |size, generation| yield("<tr><td>#{size}</td><td>#{generation}</td></tr>\n") end yield "</table></body></html>\n" end |