Class: Evilution::Parallel::WorkQueue::Validators::OptionalPositiveInt Private
- Inherits:
-
Object
- Object
- Evilution::Parallel::WorkQueue::Validators::OptionalPositiveInt
- Defined in:
- lib/evilution/parallel/work_queue/validators/optional_positive_int.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .call!(name, value) ⇒ Object private
Class Method Details
.call!(name, value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 9 10 |
# File 'lib/evilution/parallel/work_queue/validators/optional_positive_int.rb', line 6 def self.call!(name, value) return if value.nil? || (value.is_a?(Integer) && value.positive?) raise ArgumentError, "#{name} must be nil or a positive integer, got #{value.inspect}" end |