Class: Playbook::Props::NumberArray

Inherits:
Base
  • Object
show all
Defined in:
lib/playbook/props/number_array.rb

Instance Attribute Summary

Attributes inherited from Base

#default, #deprecated, #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
11
# File 'lib/playbook/props/number_array.rb', line 6

def validate(value)
  return false unless value.is_a?(::Array)
  return false if value.empty?

  value.all?(Integer)
end