葡萄实体:位于对象模型顶部的以API为中心的外观

时间:2021-01-28 16:04:35
【文件属性】:
文件名称:葡萄实体:位于对象模型顶部的以API为中心的外观
文件大小:56KB
文件格式:ZIP
更新时间:2021-01-28 16:04:35
ruby api grape entity APIRuby 葡萄::实体 介绍 这宝石增加了API框架,如实体支持。 Grape的Entity是一个基于API的外观,位于对象模型的顶部。 例 module API module Entities class Status < Grape :: Entity format_with ( :iso_timestamp ) { | dt | dt . iso8601 } expose :user_name expose :text , documentation : { type : "String" , desc : "Status update text." } expose :ip , if : { type : :full } expose :user_type , :user_id , if : lambda { | status , options | status . user . public? } expose :location , merge : true expose :contac
【文件预览】:
grape-entity-master
----.travis.yml(367B)
----Dangerfile(82B)
----Guardfile(415B)
----UPGRADING.md(1KB)
----RELEASING.md(2KB)
----Rakefile(337B)
----.rubocop.yml(1KB)
----.yardopts(46B)
----grape-entity.gemspec(1KB)
----LICENSE(1KB)
----CONTRIBUTING.md(3KB)
----Gemfile(383B)
----.rspec(31B)
----spec()
--------grape_entity()
--------spec_helper.rb(811B)
----bench()
--------serializing.rb(2KB)
----.coveralls.yml(24B)
----.gitignore(349B)
----CHANGELOG.md(17KB)
----lib()
--------grape-entity.rb(54B)
--------grape_entity()
--------grape_entity.rb(406B)
----.rubocop_todo.yml(871B)
----README.md(18KB)

网友评论