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.
7 8 9 10 11 12 |
# File 'lib/mini_profiler/context.rb', line 7 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.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def current_timer @current_timer end |
#discard ⇒ Object
Returns the value of attribute discard.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def discard @discard end |
#full_backtrace ⇒ Object
Returns the value of attribute full_backtrace.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def full_backtrace @full_backtrace end |
#inject_js ⇒ Object
Returns the value of attribute inject_js.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def inject_js @inject_js end |
#measure ⇒ Object
Returns the value of attribute measure.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def measure @measure end |
#mpt_init ⇒ Object
Returns the value of attribute mpt_init.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def mpt_init @mpt_init end |
#page_struct ⇒ Object
Returns the value of attribute page_struct.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def page_struct @page_struct end |
#skip_backtrace ⇒ Object
Returns the value of attribute skip_backtrace.
4 5 6 |
# File 'lib/mini_profiler/context.rb', line 4 def skip_backtrace @skip_backtrace end |