Method: Axlsx::RestrictionValidator.validate
- Defined in:
- lib/axlsx/util/validators.rb
.validate(name, choices, v) ⇒ Boolean
Perform validation
11 12 13 14 |
# File 'lib/axlsx/util/validators.rb', line 11 def self.validate(name, choices, v) raise ArgumentError, (ERR_RESTRICTION % [v.to_s, name, choices.inspect]) unless choices.include?(v) true end |