Sha256: 80612b7538b35a4007bb5ad3df9a5292dd4ca2584c69ca68a9c92e65981539b1

Contents?: true

Size: 411 Bytes

Versions: 2

Compression:

Stored size: 411 Bytes

Contents

module <%= app_name.classify %>
  module Entities
    module <%= entity_name.classify.pluralize %>
      class Default < Grape::Entity
        <% fields.each do |field| %>
          <% attribute, type = field.split(':')%>
          expose :<%= attribute %>, documentation: { type: '<%= type %>', desc: 'write a description here', example: 'write an example here' }
        <% end %>
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grape-transformations-0.0.2 lib/grape/generators/templates/entity.rb
grape-transformations-0.0.1 lib/grape/generators/templates/entity.rb