Module: Rack::WebProfiler::Collector::View::Helpers

Included in:
Context
Defined in:
lib/rack/web_profiler/collector.rb

Overview

Helpers

Instance Method Summary collapse

Instance Method Details

#data(k, default = nil) ⇒ Object



210
211
212
213
214
215
216
217
# File 'lib/rack/web_profiler/collector.rb', line 210

def data(k, default = nil)
  return nil if @collection.nil?

  datas = @collection.datas[@collector.identifier.to_sym][:datas]
  return datas[k] if datas.has_key?(k)

  default
end

#panel_contentObject



201
202
203
204
205
206
207
# File 'lib/rack/web_profiler/collector.rb', line 201

def panel_content
  if block_given?
    @panel_content ||= capture(&Proc.new)
  elsif !@panel_content.nil?
    @panel_content
  end
end

#tab_contentObject



192
193
194
195
196
197
198
# File 'lib/rack/web_profiler/collector.rb', line 192

def tab_content
  if block_given?
    @tab_content ||= capture(&Proc.new)
  elsif !@tab_content.nil?
    @tab_content
  end
end