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.



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_timerObject

Returns the value of attribute current_timer.



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

def current_timer
  @current_timer
end

#discardObject

Returns the value of attribute discard.



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

def discard
  @discard
end

#full_backtraceObject

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_jsObject

Returns the value of attribute inject_js.



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

def inject_js
  @inject_js
end

#measureObject

Returns the value of attribute measure.



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

def measure
  @measure
end

#mpt_initObject

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_structObject

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_backtraceObject

Returns the value of attribute skip_backtrace.



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

def skip_backtrace
  @skip_backtrace
end