Class: Rack::MiniProfiler::Context
- Inherits:
-
Object
- Object
- Rack::MiniProfiler::Context
- Defined in:
- lib/mini_profiler/context.rb
Instance Attribute Summary collapse
-
#current_timer ⇒ Object
Returns the value of attribute current_timer.
-
#discard ⇒ Object
Returns the value of attribute discard.
-
#full_backtrace ⇒ Object
Returns the value of attribute full_backtrace.
-
#inject_js ⇒ Object
Returns the value of attribute inject_js.
-
#measure ⇒ Object
Returns the value of attribute measure.
-
#mpt_init ⇒ Object
Returns the value of attribute mpt_init.
-
#page_struct ⇒ Object
Returns the value of attribute page_struct.
-
#skip_backtrace ⇒ Object
Returns the value of attribute skip_backtrace.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(opts = {}) ⇒ Context
Returns a new instance of Context.
5 6 7 8 9 10 |
# File 'lib/mini_profiler/context.rb', line 5 def initialize(opts = {}) opts["measure"] = true unless opts.key? "measure" opts.each do |k,v| self.instance_variable_set('@' + k, v) end end |
Instance Attribute Details
#current_timer ⇒ Object
Returns the value of attribute current_timer.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def current_timer @current_timer end |
#discard ⇒ Object
Returns the value of attribute discard.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def discard @discard end |
#full_backtrace ⇒ Object
Returns the value of attribute full_backtrace.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def full_backtrace @full_backtrace end |
#inject_js ⇒ Object
Returns the value of attribute inject_js.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def inject_js @inject_js end |
#measure ⇒ Object
Returns the value of attribute measure.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def measure @measure end |
#mpt_init ⇒ Object
Returns the value of attribute mpt_init.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def mpt_init @mpt_init end |
#page_struct ⇒ Object
Returns the value of attribute page_struct.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def page_struct @page_struct end |
#skip_backtrace ⇒ Object
Returns the value of attribute skip_backtrace.
2 3 4 |
# File 'lib/mini_profiler/context.rb', line 2 def skip_backtrace @skip_backtrace end |