Class: DearInventory::Validators::Integer
- Inherits:
-
DearInventory::Validator
- Object
- DearInventory::Validator
- DearInventory::Validators::Integer
- Extended by:
- T::Sig
- Defined in:
- lib/dear_inventory/validators/integer.rb
Instance Method Summary collapse
Methods inherited from DearInventory::Validator
Constructor Details
This class inherits a constructor from DearInventory::Validator
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/dear_inventory/validators/integer.rb', line 10 def call value = instance_variable_get(:@value) return if value.nil? return if value.is_a?(::Integer) raise_error("expected an Integer but received #{value.inspect}") end |