{"id":41214,"date":"2026-03-11T09:23:01","date_gmt":"2026-03-11T09:23:01","guid":{"rendered":"https:\/\/www.railscarma.com\/?p=41214"},"modified":"2026-03-11T09:27:52","modified_gmt":"2026-03-11T09:27:52","slug":"ruby%e3%83%9e%e3%83%ab%e3%83%81%e3%83%a9%e3%82%a4%e3%83%b3%e6%96%87%e5%ad%97%e5%88%97%e3%83%9e%e3%82%b9%e3%82%bf%e3%83%bc%e7%b7%8f%e5%90%88%e3%82%ac%e3%82%a4%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/ruby%e3%83%9e%e3%83%ab%e3%83%81%e3%83%a9%e3%82%a4%e3%83%b3%e6%96%87%e5%ad%97%e5%88%97%e3%83%9e%e3%82%b9%e3%82%bf%e3%83%bc%e7%b7%8f%e5%90%88%e3%82%ac%e3%82%a4%e3%83%89\/","title":{"rendered":"Ruby\u3067\u591a\u884c\u6587\u5b57\u5217\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\uff1a\u5305\u62ec\u7684\u30ac\u30a4\u30c9"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"41214\" class=\"elementor elementor-41214\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-02c7be1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"02c7be1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bc684a2\" data-id=\"bc684a2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d71df24 elementor-widget elementor-widget-text-editor\" data-id=\"d71df24\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4e16\u754c\u3067\u306f\u3001\u6587\u5b57\u5217\u306f\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306e\u57fa\u672c\u7684\u306a\u69cb\u6210\u8981\u7d20\u3067\u3059\u3002\u30a8\u30ec\u30ac\u30f3\u30c8\u306a\u69cb\u6587\u3068\u958b\u767a\u8005\u306b\u512a\u3057\u3044\u6a5f\u80fd\u3067\u77e5\u3089\u308c\u308bRuby\u3067\u306f\u3001\u6587\u5b57\u5217\u3092\u5f37\u529b\u306b\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u7c21\u5358\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u958b\u767a\u8005\u306f1\u884c\u306e\u6587\u5b57\u5217\u3092\u9023\u7d50\u3057\u305f\u308a\u6539\u884c\u6587\u5b57\u3092\u624b\u52d5\u3067\u633f\u5165\u3057\u305f\u308a\u3059\u308b\u624b\u9593\u3092\u304b\u3051\u305a\u306b\u3001\u8907\u6570\u884c\u306b\u307e\u305f\u304c\u308b\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u73fe\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u6a5f\u80fd\u306f\u3001HTML\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u57cb\u3081\u8fbc\u307f\u3001SQL\u30af\u30a8\u30ea\u306e\u8a18\u8ff0\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u3001\u3042\u308b\u3044\u306f\u8a69\u7684\u306a\u30b3\u30fc\u30c9\u30fb\u30b9\u30cb\u30da\u30c3\u30c8\u306e\u4f5c\u6210\u3068\u3044\u3063\u305f\u5834\u9762\u3067\u7279\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">Ruby\u3067\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u306f\u3001\u304d\u308c\u3044\u3067\u8aad\u307f\u3084\u3059\u304f\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u3092\u76ee\u6307\u3059\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u4e0d\u53ef\u6b20\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u8907\u6570\u884c\u6587\u5b57\u5217\u3092\u4f5c\u6210\u30fb\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u69d8\u3005\u306a\u65b9\u6cd5\u3001\u305d\u306e\u5229\u70b9\u3001\u6f5c\u5728\u7684\u306a\u843d\u3068\u3057\u7a74\u3001\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u57fa\u672c\u7684\u306a\u69cb\u6587\u304b\u3089\u9ad8\u5ea6\u306a\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3001\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u3092\u8c4a\u5bcc\u306a\u4f8b\u3067\u8aac\u660e\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u306f\u3001\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u6587\u5b57\u5217\u3092\u6d3b\u7528\u3057\u3066Ruby\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u5f37\u5316\u3059\u308b\u65b9\u6cd5\u3092\u5b8c\u5168\u306b\u628a\u63e1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002Ruby\u3092\u59cb\u3081\u305f\u3070\u304b\u308a\u306e\u521d\u5fc3\u8005\u306e\u65b9\u306b\u3082\u3001\u30b9\u30ad\u30eb\u3092\u78e8\u304d\u305f\u3044\u7d4c\u9a13\u8c4a\u5bcc\u306a\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u65b9\u306b\u3082\u3001\u3053\u306e\u30ac\u30a4\u30c9\u306f\u8cb4\u91cd\u306a\u6d1e\u5bdf\u3092\u4e0e\u3048\u3066\u304f\u308c\u308b\u3067\u3057\u3087\u3046\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">Ruby\u306e\u6587\u5b57\u5217\u51e6\u7406\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u91cd\u306d\u308b\u3054\u3068\u306b\u9032\u5316\u3057\u3001\u53ef\u8aad\u6027\u3068\u67d4\u8edf\u6027\u304c\u5411\u4e0a\u3057\u3066\u304d\u305f\u3002\u4f8b\u3048\u3070\u3001Ruby 2.3\u3067\u306f\u30b9\u30af\u30a4\u30b0\u30ea\u30fc\u30d8\u30ec\u30c9\u30c3\u30af\u304c\u5c0e\u5165\u3055\u308c\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u304c\u81ea\u52d5\u7684\u306b\u51e6\u7406\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u30b3\u30fc\u30c9\u304c\u3055\u3089\u306b\u76f4\u611f\u7684\u306b\u306a\u3063\u305f\u3002Ruby\u306e\u6700\u65b0\u30ea\u30ea\u30fc\u30b9\uff08Ruby 3.3\u4ee5\u964d\u307e\u3067\uff09\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u6a5f\u80fd\u306f\u5f15\u304d\u7d9a\u304d\u8a00\u8a9e\u306e\u4e2d\u6838\u3068\u306a\u3063\u3066\u304a\u308a\u3001\u6539\u826f\u3092\u52a0\u3048\u306a\u304c\u3089\u5f8c\u65b9\u4e92\u63db\u6027\u3092\u78ba\u4fdd\u3057\u3066\u3044\u308b\u3002.<\/span><\/p><h3><b>Ruby\u306b\u304a\u3051\u308b\u6587\u5b57\u5217\u306e\u57fa\u672c<\/b><\/h3><p><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u6587\u5b57\u5217\u306b\u5165\u308b\u524d\u306b\u3001Ruby\u306b\u304a\u3051\u308b\u6587\u5b57\u5217\u306e\u57fa\u672c\u3092\u518d\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\u6587\u5b57\u5217\u306f\u4e00\u91cd\u5f15\u7528\u7b26\uff08\u2018\uff09\u307e\u305f\u306f\u4e8c\u91cd\u5f15\u7528\u7b26\uff08\u201c\uff09\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u306e\u4e26\u3073\u3067\u3059\u3002\u4e00\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u306f\u30ea\u30c6\u30e9\u30eb\u3067\u3001\u300c\u2018\u300d\u3084\u300c\"\u300d\u4ee5\u5916\u306e\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u306f\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u305b\u3093\u3002\u4e00\u65b9\u3001\u4e8c\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u306f\u3001#{expression}\u3092\u4f7f\u7528\u3057\u305f\u88dc\u9593\u304c\u53ef\u80fd\u3067\u3001\u6539\u884c\u306e\u305f\u3081\u306e\u02f6n\u3001\u30bf\u30d6\u306e\u305f\u3081\u306e\u02f6t\u3001Unicode\u6587\u5b57\u306e\u305f\u3081\u306e\u02f6u\u306e\u3088\u3046\u306a\u5e45\u5e83\u3044\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">single = '\u30cf\u30ed\u30fc\u3001\u30ef\u30fc\u30eb\u30c9\uff01'<\/span><br \/><span style=\"font-weight: 400;\">double = \"\u3053\u3093\u306b\u3061\u306f\u3001#{\u540d\u524d}\uff01\"<\/span><\/pre><p><span style=\"font-weight: 400;\">\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u306f\u3053\u308c\u3089\u306e\u57fa\u790e\u306e\u4e0a\u306b\u6210\u308a\u7acb\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u306e\u533a\u5225\u306f\u975e\u5e38\u306b\u91cd\u8981\u3067\u3042\u308b\u3002\u30c6\u30ad\u30b9\u30c8\u304c\u8907\u6570\u884c\u306b\u307e\u305f\u304c\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u5358\u7d14\u306a\u5f15\u7528\u7b26\u3092\u4f7f\u3046\u306e\u306f\u9762\u5012\u306b\u306a\u308b\u3002\u30c6\u30ad\u30b9\u30c8\u306e\u6bb5\u843d\u3092\u66f8\u304f\u3053\u3068\u3092\u60f3\u50cf\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3053\u3067\u3001\u3088\u308a\u81ea\u7136\u306a\u65b9\u6cd5\u3067\u62e1\u5f35\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u73fe\u3067\u304d\u308b\u30de\u30eb\u30c1\u884c\u69cb\u6587\u304c\u767b\u5834\u3057\u307e\u3059\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">Python\uff08\u4e09\u91cd\u5f15\u7528\u7b26\uff09\u3001JavaScript\uff08\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30fb\u30ea\u30c6\u30e9\u30eb\uff09\u3001Perl\uff08here documents\uff09\u306a\u3069\u591a\u304f\u306e\u8a00\u8a9e\u304c\u540c\u69d8\u306e\u6a5f\u80fd\u3092\u5099\u3048\u3066\u3044\u308b\u3002Python\uff08\u30c8\u30ea\u30d7\u30eb\u30af\u30a9\u30fc\u30c8\uff09\u3001JavaScript\uff08\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30c6\u30e9\u30eb\uff09\u3001Perl\uff08\u3053\u3053\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff09\u306a\u3069\u591a\u304f\u306e\u8a00\u8a9e\u304c\u540c\u69d8\u306e\u6a5f\u80fd\u3092\u5099\u3048\u3066\u3044\u308b\u304c\u3001Ruby\u306e\u5b9f\u88c5\u306f\u3001\u305d\u306e\u6c4e\u7528\u6027\u3068\u8a00\u8a9e\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u6027\u3068\u306e\u7d71\u5408\u306e\u70b9\u3067\u969b\u7acb\u3063\u3066\u3044\u308b\u3002Ruby\u306e\u6587\u5b57\u5217\u306fString\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u3042\u308a\u3001gsub\u3001strip\u3001split\u3068\u3044\u3063\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u7d99\u627f\u3057\u3066\u3044\u308b\u3002.<\/span><\/p><h3><b>\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u306e\u5b9a\u7fa9\uff1a\u7c21\u5358\u306a\u30a2\u30d7\u30ed\u30fc\u30c1<\/b><\/h3><p><span style=\"font-weight: 400;\">\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u4f5c\u6210\u3059\u308b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5\u306f\u3001\u4e8c\u91cd\u5f15\u7528\u7b26\u3092\u4f7f\u3044\u3001\u6539\u884c\u6587\u5b57\u3092\u660e\u793a\u7684\u306b\u57cb\u3081\u8fbc\u3080\u3053\u3068\u3067\u3042\u308b\u3002\u3053\u306e\u65b9\u6cd5\u306f\u7c21\u5358\u3060\u304c\u3001\u9577\u3044\u30c6\u30ad\u30b9\u30c8\u3067\u306f\u6271\u3044\u306b\u304f\u304f\u306a\u308b\u3002.<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">multiline = \"\u3053\u308c\u304c1\u884c\u76ee\u3067\u3059\u3002\" \"\u3053\u308c\u304c2\u884c\u76ee\u3067\u3059\u3002\" \"\u305d\u3057\u3066\u3053\u308c\u304c3\u884c\u76ee\u3067\u3059\u3002\"<\/span><br \/><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u3092\u7f6e\u304f<\/span><\/pre><p><span style=\"font-weight: 400;\"><strong>\u51fa\u529b\uff1a<\/strong><br \/><\/span><span style=\"font-weight: 400;\">\u3053\u308c\u304c1\u884c\u76ee\u3060\u3002.<br \/><\/span><span style=\"font-weight: 400;\">\u3053\u308c\u304c2\u884c\u76ee\u3060\u3002.<br \/><\/span><span style=\"font-weight: 400;\">\u305d\u3057\u3066\u3053\u308c\u304c3\u884c\u76ee\u3060\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u52b9\u679c\u7684\u3067\u306f\u3042\u308b\u304c\u3001\u3053\u306e\u65b9\u6cd5\u3067\u306f\u6539\u884c\u3092\u624b\u52d5\u3067\u7ba1\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u66f8\u5f0f\u8a2d\u5b9a\u306b\u8aa4\u308a\u304c\u751f\u3058\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u5225\u306e\u65b9\u6cd5\u3068\u3057\u3066\u306f\u3001+\u6f14\u7b97\u5b50\u3084&lt;&lt;\uff08\u30b7\u30e3\u30d9\u30eb\u6f14\u7b97\u5b50\uff09\u3092\u4f7f\u3063\u305f\u6587\u5b57\u5217\u9023\u7d50\u304c\u3042\u308b\u304c\u3001\u3053\u308c\u306f\u53ef\u8aad\u6027\u306e\u4f4e\u3044\u30b3\u30fc\u30c9\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">multiline = \"\u3053\u308c\u306f1\u884c\u76ee\u3067\u3059\u3002<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"\u300c\u3053\u308c\u306f2\u884c\u76ee\u3067\u3059\u3002<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"\u300c\u3053\u308c\u304c3\u884c\u76ee\u3060\"<\/span><\/pre><p><span style=\"font-weight: 400;\">\u3042\u308b\u3044\u306f\u3001\u6b21\u306b\u8aac\u660e\u3059\u308bheredocs\u3092\u4f7f\u3063\u3066\u3001\u3088\u308a\u8aad\u307f\u3084\u3059\u304f\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002\u3053\u308c\u3089\u306e\u57fa\u672c\u7684\u306a\u65b9\u6cd5\u306f\u3001\u77ed\u3044\u8907\u6570\u884c\u306e\u30cb\u30fc\u30ba\u306b\u306f\u9069\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u3084\u5927\u304d\u306a\u30c6\u30ad\u30b9\u30c8\u30fb\u30d6\u30ed\u30c3\u30af\u3092\u542b\u3080\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u306b\u306f\u9069\u3057\u3066\u3044\u307e\u305b\u3093\u3002.<\/span><\/p><h3><b>\u30d8\u30ec\u30c9\u30c3\u30af\u30b9\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u30d1\u30ef\u30fc\u30cf\u30a6\u30b9<\/b><\/h3><p><a href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/ruby%e3%82%92%e4%bd%bf%e3%81%84%e3%81%93%e3%81%aa%e3%81%99-heredocs-%e8%a4%87%e6%95%b0%e8%a1%8c%e3%81%ae%e6%96%87%e5%ad%97%e5%88%97%e3%81%a7%e3%82%b3%e3%83%bc%e3%83%89%e3%82%92%e5%8d%98%e7%b4%94\/\"><span style=\"font-weight: 400;\">\u30d8\u30ec\u30c9\u30c3\u30af\u30b9<\/span><\/a><span style=\"font-weight: 400;\"> (\u300chere documents\u300d\u306e\u7565)\u306f\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306eRuby\u306e\u4ee3\u8868\u7684\u306a\u30e1\u30ab\u30cb\u30ba\u30e0\u3067\u3042\u308b\u3002\u533a\u5207\u308a\u6587\u5b57\u3092\u6307\u5b9a\u3057\u3001\u305d\u306e\u533a\u5207\u308a\u6587\u5b57\u306b\u518d\u3073\u51fa\u4f1a\u3046\u307e\u3067\u81ea\u7531\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u69cb\u6587\u306f&lt;&lt;\u3067\u59cb\u307e\u308a\u3001\u305d\u306e\u5f8c\u306b\u533a\u5207\u308a\u6587\u5b57\uff08\u591a\u304f\u306e\u5834\u5408EOF\u3084END\u306e\u3088\u3046\u306b\u5927\u6587\u5b57\uff09\u304c\u7d9a\u304f\u3002.<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3 = &lt;&lt;EOF<\/span><br \/><span style=\"font-weight: 400;\">\u3053\u308c\u306f\u30d8\u30ec\u30c9\u30c3\u30af\u3060\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u8907\u6570\u306e\u30e9\u30a4\u30f3\u306b\u307e\u305f\u304c\u308b\u3053\u3068\u3082\u3042\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\">&lt;&lt;EOF\uff08\u4e8c\u91cd\u5f15\u7528\u7b26\u30b9\u30bf\u30a4\u30eb\uff09\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u88dc\u9593\u306f\u6a5f\u80fd\u3059\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\">2 + 2\u306e\u5024\u306f#{2 + 2}\u3067\u3042\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u3042\u3068\u304c\u304d<\/span><br \/><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u3092\u7f6e\u304f<\/span><\/pre><p><strong>\u51fa\u529b\uff1a<br \/><\/strong><span style=\"font-weight: 400;\">\u3053\u308c\u306f\u30d8\u30ec\u30c9\u30c3\u30af\u3060\u3002.<br \/><\/span><span style=\"font-weight: 400;\">\u8907\u6570\u306e\u30e9\u30a4\u30f3\u306b\u307e\u305f\u304c\u308b\u3053\u3068\u3082\u3042\u308b\u3002.<br \/><\/span><span style=\"font-weight: 400;\">&lt;&lt;EOF\uff08\u4e8c\u91cd\u5f15\u7528\u7b26\u30b9\u30bf\u30a4\u30eb\uff09\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u88dc\u9593\u306f\u6a5f\u80fd\u3059\u308b\u3002.<br \/><\/span><span style=\"font-weight: 400;\">2 + 2\u306e\u5024\u306f4\u3067\u3042\u308b\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">Heredoc\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u4e8c\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u306e\u3088\u3046\u306b\u632f\u308b\u821e\u3044\u3001\u88dc\u9593\u3068\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u4e00\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u305f\u6319\u52d5\uff08\u88dc\u9593\u306a\u3057\uff09\u3092\u3059\u308b\u306b\u306f\u3001 &lt;&lt;\u2018EOF\u2019 \u307e\u305f\u306f &lt;&lt;-EOF \u3092\u30c7\u30ea\u30df\u30bf\u306b\u4e00\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u3093\u3067\u4f7f\u3046\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u91cd\u8981\u306a\u6a5f\u80fd\u306f\u3001\u7834\u7dda\u306e\u30d8\u30ec\u30c9\u30c3\u30af(&lt;&lt;-EOF)\u3092\u4f7f\u3048\u308b\u3053\u3068\u3067\u3001\u9589\u3058\u533a\u5207\u308a\u6587\u5b57\u3092\u30a4\u30f3\u30c7\u30f3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u30b3\u30fc\u30c9\u306e\u6574\u5217\u304c\u6539\u5584\u3055\u308c\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">def some_method<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0&lt;&lt;-EOF<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u30a4\u30f3\u30c7\u30f3\u30c8\u30fb\u30d8\u30ec\u30c9\u30c3\u30af\u3002.<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u3053\u306e\u30af\u30ed\u30fc\u30baEOF\u306f\u30a4\u30f3\u30c7\u30f3\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u3042\u3068\u304c\u304d<\/span><br \/><span style=\"font-weight: 400;\">\u7d42\u308f\u308a<\/span><\/pre><p><span style=\"font-weight: 400;\">\u3053\u308c\u306f\u3001\u8aad\u307f\u3084\u3059\u3055\u306e\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30f3\u30c8\u304c\u91cd\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u3084\u30af\u30e9\u30b9\u3067\u7279\u306b\u6709\u7528\u3067\u3042\u308b\u3002\u3057\u304b\u3057\u3001\u4f1d\u7d71\u7684\u306aheredoc\u306f\u6587\u5b57\u5217\u306e\u5148\u982d\u306b\u7a7a\u767d\u3092\u542b\u3080\u306e\u3067\u3001\u597d\u307e\u3057\u304f\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002.<\/span><\/p><h3><b>\u30b9\u30af\u30a4\u30b0\u30ea\u30fc\u30fb\u30d8\u30ec\u30c9\u30c3\u30af\u30b9\u30e2\u30c0\u30f3\u306a\u30a4\u30f3\u30c7\u30f3\u30c8\u51e6\u7406<\/b><\/h3><p><span style=\"font-weight: 400;\">Ruby 2.3 \u3067\u5c0e\u5165\u3055\u308c\u305f\u30b9\u30af\u30a4\u30b0\u30ea\u30fc\u30d8\u30ec\u30c9\u30c3\u30af (&lt;&lt;~EOF) \u306f\u3001\u6700\u3082\u30a4\u30f3\u30c7\u30f3\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u884c\u3092\u57fa\u6e96\u306b\u5148\u982d\u306e\u7a7a\u767d\u3092\u81ea\u52d5\u7684\u306b\u53d6\u308a\u9664\u304f\u3053\u3068\u3067\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3057\u307e\u3059\u3002\u3053\u306e\u305f\u3081\u3001\u4f59\u5206\u306a\u51e6\u7406\u3092\u305b\u305a\u306b\u30b3\u30fc\u30c9\u30b9\u30cb\u30da\u30c3\u30c8\u3084 YAML\u3001JSON \u3092\u57cb\u3081\u8fbc\u3080\u306e\u306b\u7406\u60f3\u7684\u3067\u3059\u3002.<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3 = &lt;&lt;~EOF<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u3053\u306e\u884c\u306b\u306f2\u3064\u306e\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u3053\u308c\u306b\u306f4\u3064\u3042\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\"> \u00a02\u4eba\u306b\u623b\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u3042\u3068\u304c\u304d<\/span><br \/><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u3092\u7f6e\u304f<\/span><\/pre><p><strong>\u51fa\u529b\uff1a<br \/><\/strong><span style=\"font-weight: 400;\">\u3053\u306e\u884c\u306b\u306f2\u3064\u306e\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308b\u3002.<br \/><\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u3053\u308c\u306b\u306f4\u3064\u3042\u308b\u3002.<br \/><\/span><span style=\"font-weight: 400;\">2\u4eba\u306b\u623b\u308b\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u30b9\u30af\u30a4\u30b0\u30ea\u30fc\u6f14\u7b97\u5b50\uff08~\uff09\u306f\u3001\u6587\u5b57\u5217\u306e\u5148\u982d\u306e\u4e00\u822c\u7684\u306a\u7a7a\u767d\u3092\u9664\u53bb\u3057\u3001\u6587\u5b57\u5217\u3092\u78ba\u5b9f\u306b\u5206\u5272\u3059\u308b\u3002\u3053\u306e\u6a5f\u80fd\u306f\u3001\u958b\u767a\u8005\u304c\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u51e6\u7406\u3059\u308b\u65b9\u6cd5\u306b\u9769\u547d\u3092\u3082\u305f\u3089\u3057\u3001gsub(\/^ss+\/, \u201d)\u306e\u3088\u3046\u306a\u5f8c\u51e6\u7406\u30e1\u30bd\u30c3\u30c9\u306e\u5fc5\u8981\u6027\u3092\u6e1b\u3089\u3057\u305f\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">Squiggly heredocs\u306f\u307e\u3060\u88dc\u9593\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001\u52d5\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u591a\u7528\u9014\u306b\u4f7f\u3048\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Rails\u306e\u3088\u3046\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u3063\u305f\u30a6\u30a7\u30d6\u958b\u767a\u3067\u306f\u3001\u30e1\u30fc\u30eb\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3084\u30d3\u30e5\u30fc\u30d1\u30fc\u30b7\u30e3\u30eb\u306b\u3088\u304f\u4f7f\u308f\u308c\u308b\u3002.<\/span><\/p><h3><b>\u30d1\u30fc\u30bb\u30f3\u30c8\u8868\u8a18\uff1a\u67d4\u8edf\u6027\u306e\u305f\u3081\u306e%Q\u3068%q<\/b><\/h3><p><span style=\"font-weight: 400;\">Ruby\u306b\u306f\u3001%Q{}\u3084%q[]\u306e\u3088\u3046\u306b\u3001\u30d1\u30fc\u30bb\u30f3\u30c8\u8868\u8a18\u3092\u4f7f\u3063\u3066\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u4e8c\u91cd\u5f15\u7528\u7b26\u3084\u4e00\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u3068\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001\u533a\u5207\u308a\u6587\u5b57\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u306e\u3067\u3001\u6587\u5b57\u5217\u306b\u5f15\u7528\u7b26\u3084\u305d\u306e\u4ed6\u306e\u7279\u6b8a\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u4fbf\u5229\u3067\u3059\u3002.<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">\u30de\u30eb\u30c1\u30e9\u30a4\u30f3 = %Q{<\/span><br \/><span style=\"font-weight: 400;\">\u3053\u308c\u306f\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3067\u3042\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u4e2d\u62ec\u5f27\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u88dc\u9593\uff1a#{Time.now}.<\/span><br \/><span style=\"font-weight: 400;\">}<\/span><\/pre><p><span style=\"font-weight: 400;\">\u533a\u5207\u308a\u6587\u5b57\u306b\u306f\u3001%Q|text|\u3084%Q[text]\u306e\u3088\u3046\u306a\u3001\u82f1\u6570\u5b57\u4ee5\u5916\u306e\u6587\u5b57\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u88dc\u9593\u3057\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001%q\u3092\u4f7f\u3046\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u3053\u306e\u8a18\u6cd5\u306f\u3001\u5f15\u7528\u7b26\u304c\u5165\u308c\u5b50\u306b\u306a\u3063\u3066\u3044\u308b\u6587\u5b57\u5217\u306e\u5834\u5408\u306b\u7279\u306b\u4fbf\u5229\u3067\u3042\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">html = %Q{&lt;div class=&quot;container&quot;&gt;\u3053\u3093\u306b\u3061\u306f\uff01&lt;\/div&gt;}<\/span><\/pre><p><span style=\"font-weight: 400;\">\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u8868\u8a18\u306f\u3001\u533a\u5207\u308a\u8a18\u53f7\u3092\u3088\u308a\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u3001heredocs\u306e\u4ee3\u66ff\u3068\u306a\u308b\u3002.<\/span><\/p><h3><b>\u88dc\u9593\u3068\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30fb\u30b3\u30f3\u30c6\u30f3\u30c4<\/b><\/h3><p><span style=\"font-weight: 400;\">Ruby\u306e\u5f37\u307f\u306e\u4e00\u3064\u306f\u6587\u5b57\u5217\u306e\u88dc\u9593\u3067\u3001\u4e8c\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u307e\u308c\u305f\u6587\u5b57\u5217\u3084\u540c\u7b49\u306e\u6587\u5b57\u5217\u306e\u4e2d\u306b\u5f0f\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u57cb\u3081\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u8907\u6570\u884c\u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u306f\u3001\u3053\u308c\u306b\u3088\u3063\u3066\u5f37\u529b\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316\u304c\u53ef\u80fd\u306b\u306a\u308b\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u3092\u691c\u8a0e\u3059\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">config = &lt;&lt;~CONFIG<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u30b5\u30fc\u30d0\u3092\u6307\u5b9a\u3057\u307e\u3059\uff1a#{env['server_host']}\u3002<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u30dd\u30fc\u30c8#{3000}<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u3042\u308b\uff1a<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0name: #{db_name}<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u30e6\u30fc\u30b6#{db_user}\u3002<\/span><br \/><span style=\"font-weight: 400;\">\u30b3\u30f3\u30d5\u30a3\u30b0<\/span><\/pre><p><span style=\"font-weight: 400;\">\u3053\u306e\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u306a\u6a5f\u80fd\u306f\u3001\u5909\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u306b\u3088\u3063\u3066\u6587\u5b57\u5217\u3092\u5165\u529b\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u306b\u304a\u3044\u3066\u975e\u5e38\u306b\u6709\u7528\u3067\u3042\u308b\u3002\u3057\u304b\u3057\u3001\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306e\u8106\u5f31\u6027\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306b\u306f\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u3088\u308a\u8907\u96d1\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316\u306b\u3064\u3044\u3066\u306f\u3001Ruby\u306eERB\uff08Embedded Ruby\uff09\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u30b3\u30fc\u30c9\u3092\u57cb\u3081\u8fbc\u3093\u3060\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u51e6\u7406\u3067\u304d\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">require 'erb'<br \/><\/span><br \/><span style=\"font-weight: 400;\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 = &lt;&lt;~ERB<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u3053\u3093\u306b\u3061\u306f\u3001\u3055\u3093\uff01<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u3042\u306a\u305f\u306e\u30b9\u30b3\u30a2\u306f\u3067\u3059\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u30a4\u30fc\u30a2\u30fc\u30eb\u30d3\u30fc<\/span><\/pre><p>\u00a0<\/p><p><span style=\"font-weight: 400;\">\u30ec\u30f3\u30c0\u30e9\u30fc = ERB.new(\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8)<\/span><br \/><span style=\"font-weight: 400;\">puts\u30ec\u30f3\u30c0\u30e9\u30fc.result(\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0)\u00a0 <\/span><i><span style=\"font-weight: 400;\"># \u540d\u524d\u3068\u30b9\u30b3\u30a2\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3068\u3057\u3066<\/span><\/i><\/p><p><span style=\"font-weight: 400;\">\u3053\u308c\u306f\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u3001\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u3067\u4e00\u822c\u7684\u306a\u672c\u683c\u7684\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u62e1\u5f35\u3059\u308b\u3002.<\/span><\/p><h3><b>\u5727\u75d5\u7ba1\u7406\u3068\u5265\u96e2\u6280\u8853<\/b><\/h3><p><span style=\"font-weight: 400;\">\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3067\u30a4\u30f3\u30c7\u30f3\u30c8\u3092\u51e6\u7406\u3059\u308b\u306e\u306f\u3088\u304f\u3042\u308b\u8ab2\u984c\u3067\u3059\u3002\u30b9\u30af\u30a4\u30b0\u30ea\u30fcheredoc\u306e\u4ed6\u306b\u3001String#strip_heredoc\uff08Rails\u306e\u62e1\u5f35\u6a5f\u80fd\u3067\u3059\u304c\u3001\u7d14\u7c8b\u306aRuby\u3067\u3082\u5b9f\u88c5\u53ef\u80fd\uff09\u3084\u624b\u52d5\u30b9\u30c8\u30ea\u30c3\u30d4\u30f3\u30b0\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u30ab\u30b9\u30bf\u30e0\u30fb\u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u6587\u5b57\u5217<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0def strip_heredoc<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0gsub(\/^<\/span><i><span style=\"font-weight: 400;\">#{scan(\/^s*\/).min_by(&amp;:length)}\/, '')<\/span><\/i><br \/><span style=\"font-weight: 400;\"> \u00a0\u7d42\u308f\u308a<\/span><br \/><span style=\"font-weight: 400;\">\u7d42\u308f\u308a<\/span><\/pre><p>\u00a0<\/p><p><span style=\"font-weight: 400;\">multiline = &lt;&lt;~EOF.strip_heredoc<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u30a4\u30f3\u30c7\u30f3\u30c8\u3055\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u3002.<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u3082\u3063\u3068\u5b57\u4e0b\u3052\u3092\u3002.<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u5c11\u306a\u3044\u3002.<\/span><br \/><span style=\"font-weight: 400;\">\u3042\u3068\u304c\u304d<\/span><\/p><p><span style=\"font-weight: 400;\">\u3053\u308c\u306b\u3088\u308a\u3001\u304d\u308c\u3044\u306a\u51fa\u529b\u304c\u4fdd\u8a3c\u3055\u308c\u308b\u3002Ruby 3.0+\u3067\u306f\u3001String#strip\u306f\u5148\u982d\/\u672b\u5c3e\u306e\u6539\u884c\u3082\u524a\u9664\u3057\u307e\u3059\u304c\u3001\u30a4\u30f3\u30c7\u30f3\u30c8\u306b\u3064\u3044\u3066\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3084\u30b9\u30af\u30a4\u30b0\u30ea\u30fc\u30fb\u30d8\u30ec\u30c9\u30c3\u30af\u306e\u65b9\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002.<\/span><\/p><h3><b>\u5b9f\u4e16\u754c\u3067\u306e\u4f7f\u7528\u4f8b<\/b><\/h3><p><span style=\"font-weight: 400;\">\u591a\u884c\u6587\u5b57\u5217\u306f\u3055\u307e\u3056\u307e\u306a\u9818\u57df\u3067\u8f1d\u304f\u3002\u30a6\u30a7\u30d6\u958b\u767a\u3067\u306f\u3001HTML\u30b9\u30cb\u30da\u30c3\u30c8\u306b\u4f7f\u308f\u308c\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">html = &lt;&lt;~HTML<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0&lt;html&gt;<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;body&gt;<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0&lt;p&gt;\u3053\u3093\u306b\u3061\u306f\u3001\u4e16\u754c\u3088\uff01&lt;\/p&gt;<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;\/body&gt;<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0&lt;\/html&gt;<\/span><br \/><span style=\"font-weight: 400;\">HTML<\/span><\/pre><p><span style=\"font-weight: 400;\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u3084\u308a\u53d6\u308a\u3067\u306f\u3001SQL\u30af\u30a8\u30ea\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">\u30af\u30a8\u30ea\u30fc = &lt;&lt;~SQL<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0SELECT * FROM users<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0WHERE age &gt; #{min_age}\u3002<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0ORDER BY name\uff1b;<\/span><br \/><span style=\"font-weight: 400;\">SQL<\/span><\/pre><p><span style=\"font-weight: 400;\">SQL\u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306b\u6ce8\u610f\u3057\u3001\u4ee3\u308f\u308a\u306b\u30d7\u30ea\u30da\u30a2\u30c9\u30fb\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3046\u3053\u3068\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u3067\u306f\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u306b\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3084\u8a2d\u5b9a\u3092\u683c\u7d0d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u30c6\u30b9\u30c8\u3067\u306f\u3001\u30e2\u30c3\u30af\u30c7\u30fc\u30bf\u3084\u671f\u5f85\u3055\u308c\u308b\u51fa\u529b\u306b\u6700\u9069\u3067\u3059\u3002.<\/span><\/p><p><span style=\"font-weight: 400;\">\u30b2\u30fc\u30e0\u958b\u767a\u3084\u30a2\u30b9\u30ad\u30fc\u30a2\u30fc\u30c8\u3067\u306f\u3001\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u306f\u66f8\u5f0f\u3092\u4fdd\u6301\u3059\u308b\uff1a<\/span><\/p><pre><span style=\"font-weight: 400;\">\u30eb\u30d3\u30fc<\/span><br \/><span style=\"font-weight: 400;\">\u30a2\u30fc\u30c8 = &lt;&lt;~ART<\/span><br \/><span style=\"font-weight: 400;\"> \u00a0\/\\<\/span><br \/><span style=\"font-weight: 400;\"> \/\u00a0 \\<\/span><br \/><span style=\"font-weight: 400;\">\/____\\<\/span><br \/><span style=\"font-weight: 400;\">\u30a2\u30fc\u30c8<\/span><\/pre><p><span style=\"font-weight: 400;\">These examples highlight their practicality across Ruby ecosystems like Rails, Sinatra, or standalone scripts.<\/span><\/p><h3><b>Best Practices for Using Multiline Strings<\/b><\/h3><p><span style=\"font-weight: 400;\">To maximize effectiveness:<\/span><\/p><ol><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Choose the Right Method<\/b><span style=\"font-weight: 400;\">: Use heredocs for long texts, percent notation for delimiter-heavy strings.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Prefer Squiggly Heredocs<\/b><span style=\"font-weight: 400;\">: For Ruby 2.3+, they handle indentation automatically.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Avoid Excessive Interpolation<\/b><span style=\"font-weight: 400;\">: For security and readability, limit dynamic parts.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Keep It Readable<\/b><span style=\"font-weight: 400;\">: Align delimiters and use consistent styling.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Test Outputs<\/b><span style=\"font-weight: 400;\">: Print or inspect multiline strings to verify formatting.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b style=\"font-style: inherit;\">Use Encoding Wisely<\/b><span style=\"font-weight: 400;\">: Specify encoding if dealing with non-ASCII, e.g., &lt;&lt;~EOF:UTF-8.<\/span><\/li><\/ol><p><span style=\"font-weight: 400;\">Following these ensures clean code.<\/span><\/p><h3><b>\u3088\u304f\u3042\u308b\u843d\u3068\u3057\u7a74\u3068\u305d\u306e\u907f\u3051\u65b9<\/b><\/h3><p><span style=\"font-weight: 400;\">Pitfalls include:<\/span><\/p><ul><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Forgotten Delimiters<\/b><span style=\"font-weight: 400;\">: Always match opening and closing in heredocs.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Unintended Indentation<\/b><span style=\"font-weight: 400;\">: Use squiggly to mitigate.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Interpolation Errors<\/b><span style=\"font-weight: 400;\">: Single-quoted heredocs don&#8217;t interpolate\u2014double-check.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b>Performance in Loops<\/b><span style=\"font-weight: 400;\">: Creating large multiline strings in tight loops can be memory-intensive; build incrementally if needed.<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><b style=\"font-style: inherit;\">Trailing Newlines<\/b><span style=\"font-weight: 400;\">: Strip if unnecessary.<\/span><\/li><\/ul><p><span style=\"font-weight: 400;\">Debugging tip: Use p multiline to inspect with quotes and escapes.<\/span><\/p><h3><b>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u95a2\u3059\u308b\u8003\u5bdf<\/b><\/h3><p><span style=\"font-weight: 400;\">Multiline strings are efficient in Ruby, as strings are immutable and operations like interpolation are optimized. However, for very large strings (e.g., megabytes), consider streaming or building in parts to avoid memory spikes.<\/span><\/p><p><span style=\"font-weight: 400;\">Benchmarking shows heredocs are comparable to concatenated strings, but squiggly adds minor overhead for dedenting. In most cases, readability trumps micro-optimizations.<\/span><\/p><h3><b>Comparison with Other Languages<\/b><\/h3><p><span style=\"font-weight: 400;\">Compared to Python&#8217;s triple quotes (&#8220;&#8221;&#8221;text&#8221;&#8221;&#8221;), Ruby&#8217;s heredocs offer better delimiter flexibility and indentation control. JavaScript&#8217;s backticks (<\/span><span style=\"font-weight: 400;\">\u6587\u7ae0<\/span><span style=\"font-weight: 400;\">) support interpolation similarly but lack built-in dedenting.<\/span><\/p><p><span style=\"font-weight: 400;\">Perl, the originator of here documents, is similar, but Ruby refines it with modern features. In Java, multiline strings were added in Java 15 as text blocks, akin to squiggly heredocs.<\/span><\/p><p><span style=\"font-weight: 400;\">Ruby&#8217;s approach balances power and simplicity, making it a favorite for text-heavy tasks.<\/span><\/p><h3><b>Advanced Techniques and Extensions<\/b><\/h3><p><span style=\"font-weight: 400;\">For even more power, gems like Stringex or ERB extend string handling. In metaprogramming, multiline strings can define code blocks dynamically.<\/span><\/p><p><span style=\"font-weight: 400;\">Ruby 3.1 introduced refinements for strings, allowing custom behaviors without monkey-patching.<\/span><\/p><p><span style=\"font-weight: 400;\">Experiment with freezing multiline strings for immutability: multiline.freeze.<\/span><\/p><h2><b>\u7d50\u8ad6<\/b><\/h2><p><span style=\"font-weight: 400;\">Multiline strings in Ruby are a testament to the language&#8217;s focus on developer happiness. From basic newlines to advanced heredocs, they provide tools to handle text elegantly. Mastering them will elevate your code&#8217;s clarity and efficiency.<\/span><\/p><p><span style=\"font-weight: 400;\">Whether embedding templates, queries, or configs, these constructs are indispensable. As Ruby evolves, expect further enhancements, but the core remains solid.<\/span><\/p><p><span style=\"font-weight: 400;\">\u3067 <\/span><a href=\"https:\/\/www.railscarma.com\/ja\"><b>\u30ec\u30fc\u30eb\u30ab\u30fc\u30de<\/b><\/a><span style=\"font-weight: 400;\">, developers leverage Ruby\u2019s powerful features like multiline strings and heredocs to build scalable, maintainable applications. By following <\/span><a href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/security-best-practices-for-ruby-on-rails-developers\/\"><span style=\"font-weight: 400;\">Ruby best practices<\/span><\/a><span style=\"font-weight: 400;\"> and clean coding principles, the team ensures that complex logic, templates, and configurations remain readable and efficient across enterprise-grade Ruby on Rails projects.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t  <div class=\"related-post slider\">\r\n        <div class=\"headline\">\u95a2\u9023\u8a18\u4e8b<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Top 20 Programming Languages in 2026: Trends, Uses, Pros, Cons &amp; How to Choose\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/top-most-popular-programming-languages\/?related_post_from=41474\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/Most-Popular-Programming-Languages-in-2026.png\" class=\"attachment-full size-full wp-post-image\" alt=\"Most Popular Programming Languages\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/Most-Popular-Programming-Languages-in-2026.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/Most-Popular-Programming-Languages-in-2026-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/Most-Popular-Programming-Languages-in-2026-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/Most-Popular-Programming-Languages-in-2026-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Top 20 Programming Languages in 2026: Trends, Uses, Pros, Cons &amp; How to Choose\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/top-most-popular-programming-languages\/?related_post_from=41474\">\r\n        Top 20 Programming Languages in 2026: Trends, Uses, Pros, Cons &amp; How to Choose  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u4f01\u696d\u304cRuby on Rails\u3092\u6d3b\u7528\u3057\u3066AI\u88fd\u54c1\u3092\u3088\u308a\u8fc5\u901f\u306b\u958b\u767a\u3059\u308b\u65b9\u6cd5\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/how-startups-can-build-ai-products-faster-with-ruby-on-rails\/?related_post_from=41464\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/How-Startups-Can-Build-AI-Products-Faster-with-Ruby-on-Rails.png\" class=\"attachment-full size-full wp-post-image\" alt=\"\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u4f01\u696d\u304cRuby on Rails\u3092\u6d3b\u7528\u3057\u3066AI\u88fd\u54c1\u3092\u3088\u308a\u8fc5\u901f\u306b\u958b\u767a\u3059\u308b\u65b9\u6cd5\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/How-Startups-Can-Build-AI-Products-Faster-with-Ruby-on-Rails.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/How-Startups-Can-Build-AI-Products-Faster-with-Ruby-on-Rails-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/How-Startups-Can-Build-AI-Products-Faster-with-Ruby-on-Rails-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/08\/How-Startups-Can-Build-AI-Products-Faster-with-Ruby-on-Rails-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u4f01\u696d\u304cRuby on Rails\u3092\u6d3b\u7528\u3057\u3066AI\u88fd\u54c1\u3092\u3088\u308a\u8fc5\u901f\u306b\u958b\u767a\u3059\u308b\u65b9\u6cd5\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/how-startups-can-build-ai-products-faster-with-ruby-on-rails\/?related_post_from=41464\">\r\n        \u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u4f01\u696d\u304cRuby on Rails\u3092\u6d3b\u7528\u3057\u3066AI\u88fd\u54c1\u3092\u3088\u308a\u8fc5\u901f\u306b\u958b\u767a\u3059\u308b\u65b9\u6cd5  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u5411\u3051\u81ea\u52d5\u5316\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308bRuby on Rails\uff1a\u73fe\u4ee3\u306e\u30d3\u30b8\u30cd\u30b9\u696d\u52d9\u306e\u5909\u9769\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/%e3%82%a8%e3%83%b3%e3%82%bf%e3%83%bc%e3%83%97%e3%83%a9%e3%82%a4%e3%82%ba%e5%90%91%e3%81%91%e8%87%aa%e5%8b%95%e5%8c%96%e3%82%bd%e3%83%aa%e3%83%a5%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e3%81%9f\/?related_post_from=41410\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Ruby-on-Rails-for-Enterprise-Automation-Solutions.png\" class=\"attachment-full size-full wp-post-image\" alt=\"\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u5411\u3051\u81ea\u52d5\u5316\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306eRuby on Rails\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Ruby-on-Rails-for-Enterprise-Automation-Solutions.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Ruby-on-Rails-for-Enterprise-Automation-Solutions-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Ruby-on-Rails-for-Enterprise-Automation-Solutions-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Ruby-on-Rails-for-Enterprise-Automation-Solutions-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u5411\u3051\u81ea\u52d5\u5316\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308bRuby on Rails\uff1a\u73fe\u4ee3\u306e\u30d3\u30b8\u30cd\u30b9\u696d\u52d9\u306e\u5909\u9769\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/%e3%82%a8%e3%83%b3%e3%82%bf%e3%83%bc%e3%83%97%e3%83%a9%e3%82%a4%e3%82%ba%e5%90%91%e3%81%91%e8%87%aa%e5%8b%95%e5%8c%96%e3%82%bd%e3%83%aa%e3%83%a5%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e3%81%9f\/?related_post_from=41410\">\r\n        \u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u5411\u3051\u81ea\u52d5\u5316\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3051\u308bRuby on Rails\uff1a\u73fe\u4ee3\u306e\u30d3\u30b8\u30cd\u30b9\u696d\u52d9\u306e\u5909\u9769  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"2026\u5e74 \u30a4\u30f3\u30c9\u306eWeb\u958b\u767a\u4f01\u696d\u30c8\u30c3\u30d720\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/top-web-development-companies-india\/?related_post_from=41420\">\r\n\r\n      <img decoding=\"async\" width=\"800\" height=\"300\" src=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Top-20-Web-Development-Companies-in-India-2026.png\" class=\"attachment-full size-full wp-post-image\" alt=\"\u30a4\u30f3\u30c9\u306e\u30a6\u30a7\u30d6\u958b\u767a\u4f1a\u793e\" srcset=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Top-20-Web-Development-Companies-in-India-2026.png 800w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Top-20-Web-Development-Companies-in-India-2026-300x113.png 300w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Top-20-Web-Development-Companies-in-India-2026-768x288.png 768w, https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/07\/Top-20-Web-Development-Companies-in-India-2026-18x7.png 18w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"2026\u5e74 \u30a4\u30f3\u30c9\u306eWeb\u958b\u767a\u4f01\u696d\u30c8\u30c3\u30d720\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/top-web-development-companies-india\/?related_post_from=41420\">\r\n        2026\u5e74 \u30a4\u30f3\u30c9\u306eWeb\u958b\u767a\u4f01\u696d\u30c8\u30c3\u30d720  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 10px;\r\n      padding: 10px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 14px !important;\r\n      color: #999999 !important;\r\n          }\r\n\r\n    .related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 14px;\r\n      color: #000000;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 12px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 2,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 2,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: false,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: false,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>","protected":false},"excerpt":{"rendered":"<p>In the world of programming, strings are fundamental building blocks for handling text data. Ruby, known for its elegant syntax and developer-friendly features, offers robust support for strings, including the ability to work with multiline strings effortlessly. Multiline strings allow developers to represent text that spans multiple lines without the hassle of concatenating single-line strings or inserting newline characters manually. This capability is particularly useful in scenarios like embedding HTML templates, writing SQL queries, generating configuration files, or even crafting poetic code snippets. Understanding multiline strings in Ruby is essential for any developer aiming to write clean, readable, and maintainable code. This article delves deep into the concept, exploring various &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.railscarma.com\/ja\/%e3%83%96%e3%83%ad%e3%82%b0\/top-web-development-companies-india\/\"> <span class=\"screen-reader-text\">2026\u5e74 \u30a4\u30f3\u30c9\u306eWeb\u958b\u767a\u4f01\u696d\u30c8\u30c3\u30d720<\/span> \u3082\u3063\u3068\u8aad\u3080 \"<\/a><\/p>","protected":false},"author":5,"featured_media":41220,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1224],"tags":[],"class_list":["post-41214","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mastering Multiline Strings in Ruby: A Comprehensive Guide<\/title>\n<meta name=\"description\" content=\"Master ruby multiline strings in Ruby using heredocs, interpolation, and formatting methods to write cleaner and more maintainable code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.railscarma.com\/ja\/\u30d6\u30ed\u30b0\/ruby\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u6587\u5b57\u5217\u30de\u30b9\u30bf\u30fc\u7dcf\u5408\u30ac\u30a4\u30c9\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mastering Multiline Strings in Ruby: A Comprehensive Guide\" \/>\n<meta property=\"og:description\" content=\"Master ruby multiline strings in Ruby using heredocs, interpolation, and formatting methods to write cleaner and more maintainable code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.railscarma.com\/ja\/\u30d6\u30ed\u30b0\/ruby\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u6587\u5b57\u5217\u30de\u30b9\u30bf\u30fc\u7dcf\u5408\u30ac\u30a4\u30c9\/\" \/>\n<meta property=\"og:site_name\" content=\"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RailsCarma\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-11T09:23:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-11T09:27:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nikhil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@railscarma\" \/>\n<meta name=\"twitter:site\" content=\"@railscarma\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nikhil\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/\"},\"author\":{\"name\":\"Nikhil\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c\"},\"headline\":\"Mastering Multiline Strings in Ruby: A Comprehensive Guide\",\"datePublished\":\"2026-03-11T09:23:01+00:00\",\"dateModified\":\"2026-03-11T09:27:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/\"},\"wordCount\":1631,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png\",\"articleSection\":[\"Blogs\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/\",\"url\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/\",\"name\":\"Mastering Multiline Strings in Ruby: A Comprehensive Guide\",\"isPartOf\":{\"@id\":\"https:\/\/www.railscarma.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png\",\"datePublished\":\"2026-03-11T09:23:01+00:00\",\"dateModified\":\"2026-03-11T09:27:52+00:00\",\"description\":\"Master ruby multiline strings in Ruby using heredocs, interpolation, and formatting methods to write cleaner and more maintainable code.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png\",\"width\":800,\"height\":300,\"caption\":\"ruby multiline string\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.railscarma.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mastering Multiline Strings in Ruby: A Comprehensive Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.railscarma.com\/#website\",\"url\":\"https:\/\/www.railscarma.com\/\",\"name\":\"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development\",\"description\":\"RailsCarma is a Ruby on Rails Development Company in Bangalore. We specialize in Offshore Ruby on Rails Development based out in USA and India. Hire experienced Ruby on Rails developers for the ultimate Web Experience.\",\"publisher\":{\"@id\":\"https:\/\/www.railscarma.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.railscarma.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.railscarma.com\/#organization\",\"name\":\"RailsCarma\",\"url\":\"https:\/\/www.railscarma.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png\",\"contentUrl\":\"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png\",\"width\":200,\"height\":46,\"caption\":\"RailsCarma\"},\"image\":{\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RailsCarma\/\",\"https:\/\/x.com\/railscarma\",\"https:\/\/www.linkedin.com\/company\/railscarma\/\",\"https:\/\/myspace.com\/railscarma\",\"https:\/\/in.pinterest.com\/railscarma\/\",\"https:\/\/www.youtube.com\/channel\/UCx3Wil-aAnDARuatTEyMdpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c\",\"name\":\"Nikhil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g\",\"caption\":\"Nikhil\"},\"sameAs\":[\"https:\/\/www.railscarma.com\/hire-ruby-on-rails-developer\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ruby\u3067\u591a\u884c\u6587\u5b57\u5217\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\uff1a\u5305\u62ec\u7684\u30ac\u30a4\u30c9","description":"Ruby\u306e\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u3001heredocs\u3001\u88dc\u9593\u3001\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30de\u30b9\u30bf\u30fc\u3057\u3001\u3088\u308a\u30af\u30ea\u30fc\u30f3\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3002.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.railscarma.com\/ja\/\u30d6\u30ed\u30b0\/ruby\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u6587\u5b57\u5217\u30de\u30b9\u30bf\u30fc\u7dcf\u5408\u30ac\u30a4\u30c9\/","og_locale":"ja_JP","og_type":"article","og_title":"Mastering Multiline Strings in Ruby: A Comprehensive Guide","og_description":"Master ruby multiline strings in Ruby using heredocs, interpolation, and formatting methods to write cleaner and more maintainable code.","og_url":"https:\/\/www.railscarma.com\/ja\/\u30d6\u30ed\u30b0\/ruby\u30de\u30eb\u30c1\u30e9\u30a4\u30f3\u6587\u5b57\u5217\u30de\u30b9\u30bf\u30fc\u7dcf\u5408\u30ac\u30a4\u30c9\/","og_site_name":"RailsCarma - Ruby on Rails Development Company specializing in Offshore Development","article_publisher":"https:\/\/www.facebook.com\/RailsCarma\/","article_published_time":"2026-03-11T09:23:01+00:00","article_modified_time":"2026-03-11T09:27:52+00:00","og_image":[{"width":800,"height":300,"url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png","type":"image\/png"}],"author":"Nikhil","twitter_card":"summary_large_image","twitter_creator":"@railscarma","twitter_site":"@railscarma","twitter_misc":{"\u57f7\u7b46\u8005":"Nikhil","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"7\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#article","isPartOf":{"@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/"},"author":{"name":"Nikhil","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c"},"headline":"Mastering Multiline Strings in Ruby: A Comprehensive Guide","datePublished":"2026-03-11T09:23:01+00:00","dateModified":"2026-03-11T09:27:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/"},"wordCount":1631,"commentCount":0,"publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"image":{"@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png","articleSection":["Blogs"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/","url":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/","name":"Ruby\u3067\u591a\u884c\u6587\u5b57\u5217\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\uff1a\u5305\u62ec\u7684\u30ac\u30a4\u30c9","isPartOf":{"@id":"https:\/\/www.railscarma.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png","datePublished":"2026-03-11T09:23:01+00:00","dateModified":"2026-03-11T09:27:52+00:00","description":"Ruby\u306e\u8907\u6570\u884c\u306e\u6587\u5b57\u5217\u3092\u3001heredocs\u3001\u88dc\u9593\u3001\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30de\u30b9\u30bf\u30fc\u3057\u3001\u3088\u308a\u30af\u30ea\u30fc\u30f3\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3002.","breadcrumb":{"@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#primaryimage","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2026\/03\/Mastering-Multiline-Strings-in-Ruby-A-Comprehensive-Guide.png","width":800,"height":300,"caption":"ruby multiline string"},{"@type":"BreadcrumbList","@id":"https:\/\/www.railscarma.com\/blog\/mastering-ruby-multiline-strings-a-comprehensive-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.railscarma.com\/"},{"@type":"ListItem","position":2,"name":"Mastering Multiline Strings in Ruby: A Comprehensive Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.railscarma.com\/#website","url":"https:\/\/www.railscarma.com\/","name":"RailsCarma - \u30aa\u30d5\u30b7\u30e7\u30a2\u958b\u767a\u306b\u7279\u5316\u3057\u305f Ruby on Rails \u958b\u767a\u4f1a\u793e","description":"RailsCarma \u306f\u30d0\u30f3\u30ac\u30ed\u30fc\u30eb\u306e Ruby on Rails \u958b\u767a\u4f1a\u793e\u3067\u3059\u3002\u5f53\u793e\u306f\u7c73\u56fd\u3068\u30a4\u30f3\u30c9\u3092\u62e0\u70b9\u3068\u3059\u308b\u30aa\u30d5\u30b7\u30e7\u30a2 Ruby on Rails \u958b\u767a\u3092\u5c02\u9580\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u7d4c\u9a13\u8c4a\u5bcc\u306a Ruby on Rails \u958b\u767a\u8005\u3092\u96c7\u3063\u3066\u3001\u7a76\u6975\u306e Web \u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u5b9f\u73fe\u3057\u307e\u3057\u3087\u3046\u3002","publisher":{"@id":"https:\/\/www.railscarma.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.railscarma.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.railscarma.com\/#organization","name":"\u30ec\u30fc\u30eb\u30ab\u30fc\u30de","url":"https:\/\/www.railscarma.com\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png","contentUrl":"https:\/\/www.railscarma.com\/wp-content\/uploads\/2020\/08\/railscarma_logo.png","width":200,"height":46,"caption":"RailsCarma"},"image":{"@id":"https:\/\/www.railscarma.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RailsCarma\/","https:\/\/x.com\/railscarma","https:\/\/www.linkedin.com\/company\/railscarma\/","https:\/\/myspace.com\/railscarma","https:\/\/in.pinterest.com\/railscarma\/","https:\/\/www.youtube.com\/channel\/UCx3Wil-aAnDARuatTEyMdpg"]},{"@type":"Person","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/1aa0357392b349082303e8222c35c30c","name":"\u30cb\u30ad\u30eb","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.railscarma.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054f31ff35e9917aaf631b8025ef679d42dd21792012d451763138d66d02a4c0?s=96&d=mm&r=g","caption":"Nikhil"},"sameAs":["https:\/\/www.railscarma.com\/hire-ruby-on-rails-developer\/"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/posts\/41214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/comments?post=41214"}],"version-history":[{"count":4,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/posts\/41214\/revisions"}],"predecessor-version":[{"id":41218,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/posts\/41214\/revisions\/41218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/media\/41220"}],"wp:attachment":[{"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/media?parent=41214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/categories?post=41214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.railscarma.com\/ja\/wp-json\/wp\/v2\/tags?post=41214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}