Class: TestProf::Vernier::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/test_prof/vernier.rb

Overview

Vernier configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
29
30
# File 'lib/test_prof/vernier.rb', line 24

def initialize
  @mode = ENV.fetch("TEST_VERNIER_MODE", :wall).to_sym
  @target = (ENV["TEST_VERNIER"] == "boot") ? :boot : :suite

  sample_interval = ENV["TEST_VERNIER_INTERVAL"].to_i
  @interval = (sample_interval > 0) ? sample_interval : nil
end

Instance Attribute Details

#intervalObject

Returns the value of attribute interval.



22
23
24
# File 'lib/test_prof/vernier.rb', line 22

def interval
  @interval
end

#modeObject

Returns the value of attribute mode.



22
23
24
# File 'lib/test_prof/vernier.rb', line 22

def mode
  @mode
end

#targetObject

Returns the value of attribute target.



22
23
24
# File 'lib/test_prof/vernier.rb', line 22

def target
  @target
end

Instance Method Details

#boot?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/test_prof/vernier.rb', line 32

def boot?
  target == :boot
end

#suite?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/test_prof/vernier.rb', line 36

def suite?
  target == :suite
end