Sha256: 8a23df1136bd22d03749b429b49d8ad078008026102bea3e7795833a91b526bb
Contents?: true
Size: 515 Bytes
Versions: 40
Compression:
Stored size: 515 Bytes
Contents
require 'grape-entity' module Api module Entities class Splines < Grape::Entity expose :id, documentation: { type: Integer, desc: 'identity of a resource' } expose :x, documentation: { type: Float, desc: 'x-value' } expose :y, documentation: { type: Float, desc: 'y-value' } expose :path, documentation: { type: String, desc: 'the requested resource' } private def path "/#{object.class.name.demodulize.to_s.underscore}/#{object.id}" end end end end
Version data entries
40 entries across 40 versions & 2 rubygems