Module: Polling::Validate
- Defined in:
- lib/polling/validate.rb
Class Method Summary collapse
Class Method Details
.value(value) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/polling/validate.rb', line 4 def self.value value case value when Array if value.size.eql? 1 value = value[0] if value.class == String value = Utils.convert value end elsif value.size > 1 if value[0].class == String value = value.map {|i| i.to_i} end end when String value = Utils.convert value end value end |