Class: SpeedLimiter::State
- Inherits:
-
Object
- Object
- SpeedLimiter::State
- Extended by:
- Forwardable
- Defined in:
- lib/speed_limiter/state.rb
Overview
Execution status model
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
Instance Method Summary collapse
-
#initialize(params:, count:, ttl:) ⇒ State
constructor
A new instance of State.
- #inspect ⇒ Object (also: #to_s)
Constructor Details
#initialize(params:, count:, ttl:) ⇒ State
Returns a new instance of State.
11 12 13 14 15 |
# File 'lib/speed_limiter/state.rb', line 11 def initialize(params:, count:, ttl:) @params = params @count = count @ttl = ttl end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
17 18 19 |
# File 'lib/speed_limiter/state.rb', line 17 def count @count end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
17 18 19 |
# File 'lib/speed_limiter/state.rb', line 17 def params @params end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
17 18 19 |
# File 'lib/speed_limiter/state.rb', line 17 def ttl @ttl end |
Instance Method Details
#inspect ⇒ Object Also known as: to_s
21 22 23 |
# File 'lib/speed_limiter/state.rb', line 21 def inspect "<#{self.class.name} key=#{key.inspect} count=#{count} ttl=#{ttl}>" end |