<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>griefworker</author_name>
  <author_url>https://blog.hatena.ne.jp/griefworker/</author_url>
  <blog_title>present</blog_title>
  <blog_url>https://tnakamura.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Grape では 1 ファイルに API をずらっと書けるけど、 規模が大きくなってくると見通しが悪くなるので、複数ファイルに分割したくなる。 Grape では API が他の API をマウントできるので、 その機能を使ってリソースごとにファイルを分割できる。 以下、サンプル。ヘルパーも別ファイルに切り出してみた。 posts.rb # coding: utf-8 module API class Posts &lt; Grape::API resource :posts do desc &quot;投稿をすべて取得&quot; get do # posts はヘルパーメソッド posts end desc &quot;投稿を…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftnakamura.hatenablog.com%2Fentry%2F2014%2F07%2F08%2F113000&quot; title=&quot;Grape で API を複数ファイルに分けて定義する - present&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-07-08 11:30:00</published>
  <title>Grape で API を複数ファイルに分けて定義する</title>
  <type>rich</type>
  <url>https://tnakamura.hatenablog.com/entry/2014/07/08/113000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
