<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Yasaichi</author_name>
  <author_url>https://blog.hatena.ne.jp/Yasaichi/</author_url>
  <blog_title>WEB SALAD</blog_title>
  <blog_url>https://web-salad.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>はじめに Rubyで文字列操作だけでパス文字列を組み立てようとすると苦しいコードになりがちですが、Pathnameクラスを使うといい感じに書けることがわかったのでまとめました。 Pathnameとは Rubyの組み込みクラスで、パス名をオブジェクト指向っぽく扱うことができます。 例えば、以下のようなインスタンスメソッドが用意されています。 directory?: selfがディレクトリであればtrueを返す size: selfのファイルサイズを返す symlink?: selfがシンボリックリンクである時にtrueを返す 用意されているメソッドを見ればわかるように、自身の表すパスの情報を取得…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fweb-salad.hateblo.jp%2Fentry%2F2015%2F04%2F08%2F090000&quot; title=&quot;Rubyでパス文字列を組み立てるときはPathnameクラスを使おう - WEB SALAD&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>2015-04-08 09:00:00</published>
  <title>Rubyでパス文字列を組み立てるときはPathnameクラスを使おう</title>
  <type>rich</type>
  <url>https://web-salad.hateblo.jp/entry/2015/04/08/090000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
