Class: SpeedGun::Config
- Inherits:
-
Object
- Object
- SpeedGun::Config
- Defined in:
- lib/speed_gun/config.rb
Constant Summary collapse
- DEFAULT_PREFIX =
'/speed_gun'
Instance Attribute Summary collapse
-
#enabled ⇒ Boolean
Enabled SpeedGun.
-
#ignored_profilers ⇒ Object
Returns the value of attribute ignored_profilers.
-
#lineprof_paths ⇒ Object
Returns the value of attribute lineprof_paths.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#prefix ⇒ String
Console and API endpoint prefix.
-
#skip_paths ⇒ Object
Returns the value of attribute skip_paths.
-
#store ⇒ Object
Returns the value of attribute store.
-
#webapp ⇒ Object
Returns the value of attribute webapp.
Instance Method Summary collapse
- #disabled? ⇒ Boolean
-
#enabled? ⇒ Boolean
Enabled SpeedGun.
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/speed_gun/config.rb', line 24 def initialize @enabled = true @webapp = true @store = SpeedGun::Store::MemoryStore.new @prefix = DEFAULT_PREFIX @logger = ::Logger.new(STDOUT) @skip_paths = ['/favicon.ico'] @lineprof_paths = [] @ignored_profilers = [] end |
Instance Attribute Details
#enabled ⇒ Boolean
Returns Enabled SpeedGun.
10 11 12 |
# File 'lib/speed_gun/config.rb', line 10 def enabled @enabled end |
#ignored_profilers ⇒ Object
Returns the value of attribute ignored_profilers.
22 23 24 |
# File 'lib/speed_gun/config.rb', line 22 def ignored_profilers @ignored_profilers end |
#lineprof_paths ⇒ Object
Returns the value of attribute lineprof_paths.
21 22 23 |
# File 'lib/speed_gun/config.rb', line 21 def lineprof_paths @lineprof_paths end |
#logger ⇒ Object
Returns the value of attribute logger.
18 19 20 |
# File 'lib/speed_gun/config.rb', line 18 def logger @logger end |
#prefix ⇒ String
Returns Console and API endpoint prefix.
16 17 18 |
# File 'lib/speed_gun/config.rb', line 16 def prefix @prefix end |
#skip_paths ⇒ Object
Returns the value of attribute skip_paths.
20 21 22 |
# File 'lib/speed_gun/config.rb', line 20 def skip_paths @skip_paths end |
#store ⇒ Object
Returns the value of attribute store.
13 14 15 |
# File 'lib/speed_gun/config.rb', line 13 def store @store end |
#webapp ⇒ Object
Returns the value of attribute webapp.
11 12 13 |
# File 'lib/speed_gun/config.rb', line 11 def webapp @webapp end |
Instance Method Details
#disabled? ⇒ Boolean
40 41 42 |
# File 'lib/speed_gun/config.rb', line 40 def disabled? !enabled? end |
#enabled? ⇒ Boolean
Returns Enabled SpeedGun.
36 37 38 |
# File 'lib/speed_gun/config.rb', line 36 def enabled? enabled end |