Class: TestProf::StackProf::Configuration
- Inherits:
-
Object
- Object
- TestProf::StackProf::Configuration
- Defined in:
- lib/test_prof/stack_prof.rb
Overview
StackProf configuration
Instance Attribute Summary collapse
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #boot? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #raw? ⇒ Boolean
- #suite? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
27 28 29 30 31 |
# File 'lib/test_prof/stack_prof.rb', line 27 def initialize @mode = ENV.fetch('TEST_STACK_PROF_MODE', :wall).to_sym @target = ENV['TEST_STACK_PROF'] == 'boot' ? :boot : :suite @raw = ENV['TEST_STACK_PROF_RAW'] != '0' end |
Instance Attribute Details
#interval ⇒ Object
Returns the value of attribute interval.
25 26 27 |
# File 'lib/test_prof/stack_prof.rb', line 25 def interval @interval end |
#mode ⇒ Object
Returns the value of attribute mode.
25 26 27 |
# File 'lib/test_prof/stack_prof.rb', line 25 def mode @mode end |
#raw ⇒ Object
Returns the value of attribute raw.
25 26 27 |
# File 'lib/test_prof/stack_prof.rb', line 25 def raw @raw end |
#target ⇒ Object
Returns the value of attribute target.
25 26 27 |
# File 'lib/test_prof/stack_prof.rb', line 25 def target @target end |
Instance Method Details
#boot? ⇒ Boolean
37 38 39 |
# File 'lib/test_prof/stack_prof.rb', line 37 def boot? target == :boot end |
#raw? ⇒ Boolean
33 34 35 |
# File 'lib/test_prof/stack_prof.rb', line 33 def raw? @raw == true end |
#suite? ⇒ Boolean
41 42 43 |
# File 'lib/test_prof/stack_prof.rb', line 41 def suite? target == :suite end |