Class: Praxis::Types::SplattableStringArray

Inherits:
Attributor::Collection
  • Object
show all
Defined in:
lib/praxis/types/splattable_string_array.rb

Class Method Summary collapse

Class Method Details

.decode_string(value, _context) ⇒ Object

Make a type, to allow to load the value, as s single string, if it isn’t a numerable This way we can do displayable: ‘foobar’ , or displayable: [‘one’, ‘two’]



8
9
10
# File 'lib/praxis/types/splattable_string_array.rb', line 8

def self.decode_string(value, _context)
  Array(value)
end