Method: JSONCop::Generator#decode_template
- Defined in:
- lib/jsoncop/generator.rb
#decode_template(model) ⇒ Object
89 90 91 92 93 |
# File 'lib/jsoncop/generator.rb', line 89 def decode_template(model) model.attributes.map do |attr| "let #{attr.name} = decoder.decode#{attr.decode_type}(forKey: \"#{attr.name}\") as? #{attr.type}" end.join(",\n\t\t\t") end |