Class: Confium::ThresholdError

Inherits:
Error
  • Object
show all
Defined in:
lib/confium/errors/threshold_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, details_hash = nil, **kwargs) ⇒ ThresholdError

Returns a new instance of ThresholdError.



9
10
11
12
13
14
# File 'lib/confium/errors/threshold_error.rb', line 9

def initialize(message = nil, details_hash = nil, **kwargs)
  message, kwargs = Confium::Errors::Coerce.args(message, details_hash, kwargs)
  @have_count = kwargs.delete(:have_count)
  @need_count = kwargs.delete(:need_count)
  super(message, details: { have_count: @have_count, need_count: @need_count, **kwargs })
end

Instance Attribute Details

#have_countObject (readonly)

Returns the value of attribute have_count.



7
8
9
# File 'lib/confium/errors/threshold_error.rb', line 7

def have_count
  @have_count
end

#need_countObject (readonly)

Returns the value of attribute need_count.



7
8
9
# File 'lib/confium/errors/threshold_error.rb', line 7

def need_count
  @need_count
end