Class: RateLimit::Bucket

Inherits:
Struct
  • Object
show all
Defined in:
lib/ratelimit/bucketbased.rb

Overview

  • Returns :

    • a Bucket

Instance Attribute Summary collapse

Instance Attribute Details

#costObject

Returns the value of attribute cost

Returns:

  • (Object)

    the current value of cost



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def cost
  @cost
end

#currentObject

Returns the value of attribute current

Returns:

  • (Object)

    the current value of current



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def current
  @current
end

#last_refillObject

Returns the value of attribute last_refill

Returns:

  • (Object)

    the current value of last_refill



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def last_refill
  @last_refill
end

#maxObject

Returns the value of attribute max

Returns:

  • (Object)

    the current value of max



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def max
  @max
end

#minObject

Returns the value of attribute min

Returns:

  • (Object)

    the current value of min



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def min
  @min
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def name
  @name
end

#refill_amountObject

Returns the value of attribute refill_amount

Returns:

  • (Object)

    the current value of refill_amount



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def refill_amount
  @refill_amount
end

#refill_epochObject

Returns the value of attribute refill_epoch

Returns:

  • (Object)

    the current value of refill_epoch



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def refill_epoch
  @refill_epoch
end

#total_usedObject

Returns the value of attribute total_used

Returns:

  • (Object)

    the current value of total_used



18
19
20
# File 'lib/ratelimit/bucketbased.rb', line 18

def total_used
  @total_used
end