Class: Playbook::Props::Numeric

Inherits:
Base
  • Object
show all
Defined in:
app/pb_kits/playbook/props/numeric.rb

Instance Attribute Summary

Attributes inherited from Base

#default, #kit, #name, #required

Instance Method Summary collapse

Methods inherited from Base

#initialize, #validate!, #value

Constructor Details

This class inherits a constructor from Playbook::Props::Base

Instance Method Details

#validate(value) ⇒ Object



6
7
8
9
10
# File 'app/pb_kits/playbook/props/numeric.rb', line 6

def validate(value)
  value.nil? ||
    value.is_a?(Integer) ||
    value.is_a?(Float)
end