Sha256: e3f567561d7e06f8bee8de195640fb3154e507a9ab70be407e29625278a5a91b

Contents?: true

Size: 383 Bytes

Versions: 13

Compression:

Stored size: 383 Bytes

Contents

class <%= @deserializer_class.capitalize %>Deserializer
  def self.parse(params)
  <% @deserializer_properties.each do |attribute| -%>
  <%= attribute %> = params.dig(:payload, :<%= attribute %>)
  <% end -%>

    { <%= @deserializer_class %>: {
    <% @deserializer_properties.each do |attribute| -%>
    <%= attribute %>: <%= attribute %>,
    <% end -%>
    }.compact }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mobile_workflow-0.12.2 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.12.1 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.12.0 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.11.1 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.11.0 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.10.2 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.10.1 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.10.0 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.9.0 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.8.9 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.7.9 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.7.8 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb
mobile_workflow-0.7.7 lib/generators/mobile_workflow/install/templates/deserializer.rb.erb