Class: Rack::MiniProfiler::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/mini_profiler/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Context

Returns a new instance of Context.



4
5
6
7
8
9
# File 'lib/mini_profiler/context.rb', line 4

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_timerObject

Returns the value of attribute current_timer.



2
3
4
# File 'lib/mini_profiler/context.rb', line 2

def current_timer
  @current_timer
end

#discardObject

Returns the value of attribute discard.



2
3
4
# File 'lib/mini_profiler/context.rb', line 2

def discard
  @discard
end

#full_backtraceObject

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_jsObject

Returns the value of attribute inject_js.



2
3
4
# File 'lib/mini_profiler/context.rb', line 2

def inject_js
  @inject_js
end

#measureObject

Returns the value of attribute measure.



2
3
4
# File 'lib/mini_profiler/context.rb', line 2

def measure
  @measure
end

#mpt_initObject

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_structObject

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_backtraceObject

Returns the value of attribute skip_backtrace.



2
3
4
# File 'lib/mini_profiler/context.rb', line 2

def skip_backtrace
  @skip_backtrace
end