Class: ThrottleMachines::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
27
28
29
30
# File 'lib/throttle_machines.rb', line 22

def initialize
  @default_limit = 100
  @default_period = 60 # 1 minute
  @default_storage = :memory
  @clock = nil
  @instrumentation_enabled = true
  @instrumentation_backend = nil
  @_storage_instance = nil
end

Instance Attribute Details

#_storage_instanceObject

Returns the value of attribute _storage_instance.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def _storage_instance
  @_storage_instance
end

#clockObject

Returns the value of attribute clock.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def clock
  @clock
end

#default_limitObject

Returns the value of attribute default_limit.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def default_limit
  @default_limit
end

#default_periodObject

Returns the value of attribute default_period.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def default_period
  @default_period
end

#default_storageObject

Returns the value of attribute default_storage.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def default_storage
  @default_storage
end

#instrumentation_backendObject

Returns the value of attribute instrumentation_backend.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def instrumentation_backend
  @instrumentation_backend
end

#instrumentation_enabledObject

Returns the value of attribute instrumentation_enabled.



19
20
21
# File 'lib/throttle_machines.rb', line 19

def instrumentation_enabled
  @instrumentation_enabled
end