Method: Quintype::API::BaseFunctions::ClassFunctions#coerce_array
- Defined in:
- lib/quintype/api/base_functions.rb
#coerce_array(key, clazz) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/quintype/api/base_functions.rb', line 12 def coerce_array(key, clazz) class_eval <<-EOF def #{key.to_s} super.map { |i| #{clazz.name}.from_hash(i)} end EOF end |