Module: DIDWW::Types::Strings
- Defined in:
- lib/didww/types/strings.rb
Class Method Summary collapse
Class Method Details
.cast(values, default) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/didww/types/strings.rb', line 8 def cast(values, default) return default unless values.is_a?(Array) values.map do |value| cast_item(value) end end |
.cast_item(value) ⇒ Object
16 17 18 |
# File 'lib/didww/types/strings.rb', line 16 def cast_item(value) value.to_s end |