{"id":175,"date":"2015-06-12T23:20:55","date_gmt":"2015-06-12T14:20:55","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2015\/06\/12\/readable_code"},"modified":"2022-10-26T09:34:33","modified_gmt":"2022-10-26T00:34:33","slug":"readable_code","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2015\/06\/12\/readable_code\/","title":{"rendered":"\u30ea\u30fc\u30c0\u30d6\u30eb\u30b3\u30fc\u30c9\u3092\u5fc3\u304c\u3051\u308b"},"content":{"rendered":"

\u30ec\u30fc\u30eb\u306e\u4e0a\u306e\u30eb\u30d3\u30fc<\/strong><\/a>\u304c\u597d\u304d\u306a\u524d\u7530\u3067\u3059\u3002
\n\u6885\u96e8\u3067\u96e8\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u3002
\n\u4e3b\u306a\u79fb\u52d5\u624b\u6bb5\u304c\u81ea\u8ee2\u8eca\u306a\u79c1\u3068\u3057\u3066\u306f\u8f9b\u3044\u6642\u671f\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n

\u73fe\u5728\u3001\u30ea\u30fc\u30c0\u30d6\u30eb\u30b3\u30fc\u30c9\uff08\u30aa\u30e9\u30a4\u30ea\u30fc\u30fb\u30b8\u30e3\u30d1\u30f3\uff09<\/strong><\/a>\u3092\u518d\u8aad\u3057\u3066\u3044\u307e\u3059\u3002
\n\u9032\u884c\u4e2d\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u540d\u3084\u5909\u6570\u540d\u306b\u60a9\u3080\u3053\u3068\u304c\u591a\u304b\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u53c2\u8003\u306b\u306a\u308c\u3070\u3068\u518d\u8aad\u3057\u3066\u3044\u308b\u6b21\u7b2c\u3067\u3059\u3002<\/p>\n

\u547d\u540d\u306e\u5927\u5207\u3055<\/h2>\n

\u5fd9\u3057\u3044\u304b\u3089\u3001\u3081\u3093\u3069\u304f\u3055\u3044\u304b\u3089\u3001\u3068\u3064\u3044\u3064\u3044\u547d\u540d\u306b\u5bfe\u3057\u3066\u758e\u304b\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u3087\u3046\u304b\u3002
\n\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30b9\u30bf\u30fc\u30c8\u6642\u306b\u304a\u304b\u3057\u306a\u540d\u524d\u3092\u547d\u540d\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u9014\u4e2d\u3067\u62c5\u5f53\u8005\u304c\u4ee3\u308f\u3063\u305f\u308a\u3057\u305f\u6642\u306a\u3069\u3001\u5168\u304f\u610f\u5473\u304c\u5206\u304b\u3089\u306a\u304b\u3063\u305f\u308a\u3001\u975e\u5e38\u306b\u6271\u3044\u306b\u304f\u3044\u30c7\u30fc\u30bf\u3068\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u308a\u306a\u3069\u3001\u5f0a\u5bb3\u306f\u8a08\u308a\u77e5\u308c\u307e\u305b\u3093\u3002
\n\u4e00\u756a\u6700\u521d\u306b\u540d\u524d\u3084\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u3057\u3063\u304b\u308a\u8a2d\u8a08\u3057\u3066\u304a\u304f\u3001\u3068\u3044\u3046\u3053\u3068\u304c\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3057\u3084\u3059\u3044Web\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u308b\u4e0a\u3067\u975e\u5e38\u306b\u91cd\u8981\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n

Web\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u3063\u3066\u3044\u304f\u4e0a\u3067\u6c7a\u3081\u3066\u3044\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u91cd\u8981\u306a\u540d\u524d\u306f\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002
\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u3001\u30c6\u30fc\u30d6\u30eb\u30ab\u30e9\u30e0\u540d\u3001\u30e1\u30bd\u30c3\u30c9\u540d\u3001\u5909\u6570\u540d\u3001\u306a\u3069\u306a\u3069\u3002
\n\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3067\u66f8\u3044\u3066\u3044\u304f\u306e\u3067\u3001\u5f53\u7136\u65e5\u672c\u8a9e\u304b\u3089\u82f1\u8a9e\u306b\u5909\u63db\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002
\n\u3069\u3046\u3057\u3066\u3082\u8a72\u5f53\u304c\u7121\u3044\u5834\u5408\u306f\u65e5\u672c\u8a9e\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306b\u3059\u308b\u3057\u304b\u306a\u3044\u3067\u3059\u304c\u3002
\n\u672c\u5f53\u306b\u30d3\u30b7\u3063\u3068\u6c7a\u307e\u308b\u540d\u524d\u3092\u547d\u540d\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u96e3\u3057\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u5f0a\u793e\u3067\u306f\u3053\u306e\u540d\u524d\u6c7a\u3081\u306b\u975e\u5e38\u306b\u6642\u9593\u3092\u5272\u3044\u3066\u8b70\u8ad6\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002
\n\u4e00\u756a\u91cd\u70b9\u3092\u7f6e\u3044\u3066\u3044\u308b\u306e\u306f\u3001\u540d\u524d\u3092\u898b\u305f\u3060\u3051\u3067\u305d\u306e\u5f79\u5272\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306a\u540d\u524d\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3002<\/p>\n

\u547d\u540d\u898f\u5247<\/h2>\n

\u30ea\u30fc\u30c0\u30d6\u30eb\u30b3\u30fc\u30c9\u306e\u4e2d\u3067\u306f\u547d\u540d\u306e\u969b\u306b\u3001\u4e0b\u8a18\u306e\u30eb\u30fc\u30eb\u3092\u5b88\u308c\u3068\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n

\u2460\u660e\u78ba\u306a\u5358\u8a9e\u3092\u9078\u3076
\n\u2461\u6c4e\u7528\u7684\u306a\u540d\u524d\u3092\u907f\u3051\u308b(\u3042\u308b\u3044\u306f\u3001\u4f7f\u3046\u72b6\u6cc1\u3092\u9078\u3076)
\n\u2462\u62bd\u8c61\u7684\u306a\u540d\u524d\u3088\u308a\u3082\u5177\u4f53\u7684\u306a\u540d\u524d\u3092\u4f7f\u3046
\n\u2463\u63a5\u5c3e\u8f9e\u3084\u63a5\u982d\u8f9e\u3092\u4f7f\u3063\u3066\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b
\n\u2464\u540d\u524d\u306e\u9577\u3055\u3092\u6c7a\u3081\u308b
\n\u2465\u540d\u524d\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u60c5\u5831\u3092\u4f1d\u3048\u308b<\/p>\n

\u2460\u301c\u2463\u307e\u3067\u306f\u540d\u524d\u3092\u5177\u4f53\u7684\u306b\u3059\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n

\u2465\u306b\u3064\u3044\u3066\u306f\u3001Rails<\/strong>\u3084Ruby<\/strong>\u306e\u898f\u7d04\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u540d\u524d\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3082\u305d\u308c\u3089\u306b\u5f93\u3046\u306e\u304c\u826f\u3044\u3068\u8003\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n

\u2464\u306b\u3064\u3044\u3066\u306f\u96e3\u3057\u3044\u3068\u3053\u308d\u3060\u306a\u3068\u601d\u3044\u307e\u3057\u305f\u3002
\n\u30ea\u30fc\u30c0\u30d6\u30eb\u30b3\u30fc\u30c9\u6587\u4e2d\u3067\u306f\u300c\u9577\u3044\u540d\u524d\u3092\u547d\u540d\u3059\u308b\u306e\u306f\u554f\u984c\u3058\u3083\u306a\u3044<\/strong>\u300d\u3068\u8a00\u3063\u3066\u3044\u307e\u3059\u3002
\n\u30b9\u30b3\u30fc\u30d7\u304c\u5c0f\u3055\u3044\u6642\u306f\u77ed\u304f\u3066\u3082\u826f\u3044\u3001\u305f\u3060\u3057\u30b9\u30b3\u30fc\u30d7\u304c\u5927\u304d\u3044\u6642\u306f\u3001\u9577\u3055\u3092\u512a\u5148\u3055\u305b\u305f\u307b\u3046\u304c\u826f\u3044\u3001\u3068\u3044\u3046\u5185\u5bb9\u3067\u3057\u305f\u304c\u3001\u5f0a\u793e\u3067\u306f
rubocop<\/strong><\/a>\u3067\u30b3\u30fc\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304a\u308a\u3001\u3042\u307e\u308a\u30e1\u30bd\u30c3\u30c9\u540d\u3084\u5909\u6570\u540d\u304c\u9577\u3044\u3068\uff11\u30e9\u30a4\u30f3\u3042\u305f\u308a80\u6841\u306e\u5236\u9650\u306b\u5f15\u3063\u304b\u304b\u308a\u3084\u3059\u304f\u306a\u308a\u3001\u7121\u99c4\u306a\u6539\u884c\u306a\u3069\u3067\u4f59\u8a08\u306b\u30b3\u30fc\u30c9\u304c\u898b\u3065\u3089\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u3001\u3068\u3044\u3046\u672c\u672b\u8ee2\u5012\u306a\u3053\u3068\u306b\u306a\u308b\u3053\u3068\u304c\u60f3\u50cf\u3067\u304d\u308b\u306e\u3067\u3001\u3084\u306f\u308a\u77ed\u304f\u5177\u4f53\u7684\u306b\u3059\u308b<\/strong>\u3001\u3068\u3044\u3046\u30cf\u30fc\u30c9\u306a\u547d\u540d\u30bb\u30f3\u30b9\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n

\u91cd\u8981\u306a\u306e\u306f\u3084\u306f\u308a\u540d\u524d\u306b\u60c5\u5831\u3092\u8a70\u3081\u8fbc\u3080\u3001\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n

\u30b3\u30fc\u30c9\u4fee\u6b63<\/h2>\n

\u4ee5\u4e0a\u3092\u8e0f\u307e\u3048\u3066\u30ab\u30bf\u30ab\u30ca\u3092\u6271\u3046\u30ab\u30bf\u30ab\u30ca\u30af\u30e9\u30b9<\/strong>\u306e\u30b3\u30fc\u30c9\u3092\u4fee\u6b63\u3057\u3066\u307f\u307e\u3057\u305f\u3002
\n\u5404\u30e1\u30bd\u30c3\u30c9\u306e\u5f79\u5272\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n

    \n
  1. \n

    include_kana_list?<\/strong>
    \n\u4e0e\u3048\u3089\u308c\u305f\u6587\u5b57(\u30ed\u30fc\u30de\u5b57)\u304c\u3001KANA_LIST<\/code>\u306e\u5404\u884c\u306e\u5148\u982d\u6587\u5b57\u3092\u30ed\u30fc\u30de\u5b57\u306b\u3057\u305f\u30ad\u30fc\u5024\u4e00\u89a7['a', 'ka', 'sa', 'ta', 'na', 'ha', 'ma', 'ya', 'ra', 'wa']<\/code>\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u8fd4\u3059\u3002
    \n\u4f8b: 'na'<\/code> \u2192 true<\/code>
    \n\u4f8b: '\u30ca'<\/code> \u2192 false<\/code> '20'<\/code> \u2192 false<\/code><\/p>\n<\/li>\n

  2. \n

    kana_list_line<\/strong>
    \n\u4e0e\u3048\u3089\u308c\u305f\u6587\u5b57(\u30ed\u30fc\u30de\u5b57)\u304b\u3089KANA_LIST<\/code>\u306e\u5404\u884c\u3092\u53d6\u5f97\u3059\u308b\u3002
    \n\u4f8b: 'a'<\/code> \u2192 ['\u30a2', '\u30a4', '\u30a6', '\u30a8', '\u30aa']<\/code>
    \n\u4f8b: 'sa'<\/code> \u2192 ['\u30b5', '\u30b7', '\u30b9', '\u30bb', '\u30bd']<\/code><\/p>\n<\/li>\n

  3. \n

    alphabetical_head_string<\/strong>
    \n\u4e0e\u3048\u3089\u308c\u305f\u30ab\u30bf\u30ab\u30ca\u6587\u5b57\u5217\u306e\u5148\u982d\u6587\u5b57\u304c\u3001\uff15\uff10\u97f3\u306e\u3069\u306e\u884c(\u3042\u884c\u3001\u304b\u884c\u306a\u3069)\u306b\u6240\u5c5e\u3057\u3066\u3044\u308b\u304b\u5224\u65ad\u3057\u3001\u3042\u884c\u306a\u3089'a'<\/code>\u3001\u304b\u884c\u306a\u3089'ka'<\/code>\u3068\u3044\u3063\u305f\u30ed\u30fc\u30de\u5b57\u3067\u8fd4\u3059\u3002
    \n\u4f8b: '\u30cb\u30b7\u30ce\u30df\u30e4\u30b7'<\/code> \u2192 'na'<\/code>
    \n\u4f8b: '\u30b2\u30ed\u30b7'<\/code> \u2192 'ka'<\/code><\/p>\n<\/li>\n<\/ol>\n

    # \u30ab\u30bf\u30ab\u30ca\u30af\u30e9\u30b9\nclass Katakana\n  KANA_LIST = { a: %w(\u30a2 \u30a4 \u30a6 \u30a8 \u30aa),\n                ka: %w(\u30ab \u30ad \u30af \u30b1 \u30b3 \u30ac \u30ae \u30b0 \u30b2 \u30b4),\n                sa: %w(\u30b5 \u30b7 \u30b9 \u30bb \u30bd \u30b6 \u30b8 \u30ba \u30bc \u30be),\n                ta: %w(\u30bf \u30c1 \u30c4 \u30c6 \u30c8 \u30c0 \u30c2 \u30c5 \u30c7 \u30c9),\n                na: %w(\u30ca \u30cb \u30cc \u30cd \u30ce),\n                ha: %w(\u30cf \u30d2 \u30d5 \u30d8 \u30db \u30d0 \u30d3 \u30d6 \u30d9 \u30dc \u30d1 \u30d4 \u30d7 \u30da \u30dd),\n                ma: %w(\u30de \u30df \u30e0 \u30e1 \u30e2),\n                ya: %w(\u30e4 \u30e6 \u30e8),\n                ra: %w(\u30e9 \u30ea \u30eb \u30ec \u30ed),\n                wa: %w(\u30ef \u30f0 \u30f1 \u30f2 \u30f3) }\n\n  def initialize(str)\n    @katakana = str\n  end\n\n  def self.include_kana_list?(param)\n    KANA_LIST.key?(param.to_sym)\n  end\n\n  def self.kana_list_line(param)\n    KANA_LIST[param.to_sym]\n  end\n\n  def alphabetical_head_string\n    KANA_LIST.each do |key, val|\n      return key.to_s if val.include?(@katakana[0])\n    end\n    nil\n  end\nend<\/code><\/pre>\n

    \u9806\u306b\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n

    3\u884c\u76ee KANA_LIST<\/strong>
    \n\u5b9f\u969b\u306b\u3053\u306eKANA_LIST<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001
    \nKatakana.KANA_LIST<\/code>\u3068\u306a\u308a\u3001kana<\/code>\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u3002
    \nKatakana\u30af\u30e9\u30b9\u306e\u30ea\u30b9\u30c8\u306f\u5f53\u7136\u30ab\u30bf\u30ab\u30ca\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001KANA_<\/code>\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n

    18\u884c\u76ee include_kana_list?<\/strong>
    \n3\u884c\u76ee\u306eKANA_LIST<\/code>\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3001\u3092\u5224\u65ad\u3059\u308b\u3082\u306e\u3068\u3057\u3066\u3001kana_list<\/code>\u3068\u3057\u307e\u3057\u305f\u304c\u30013\u884c\u76ee\u3092LIST<\/code>\u3060\u3051\u306b\u3057\u305f\u306e\u3067\u3001\u3053\u3061\u3089\u3082kana<\/code>\u3092\u524a\u9664\u3057\u307e\u3059\u3002
    \n\u5404\u884c\u306e\u30ad\u30fc\u5024\u4e00\u89a7<\/code>\u3092line_keys<\/code>\u3068\u3057\u307e\u3059\u3068\u3001include_list_line_keys?<\/code>\u3068\u306a\u308a\u307e\u3059\u3002
    \n\u5b9f\u969b\u306b\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u6642\u306fKatakana.include_list_line_keys?(chara)<\/code>\u3068\u306a\u308a\u307e\u3059\u304c\u3001keys<\/code>\u3068\u3044\u3046\u306e\u306f\u5916\u304b\u3089\u898b\u305f\u6642\u306b\u306f\u4f55\u306ekey<\/code>\u304b\u304c\u5206\u304b\u308a\u306b\u304f\u3044\u304b\u306a\u3068\u601d\u3044\u307e\u3057\u305f\u3002
    \n\u305d\u3053\u3067\u6700\u7d42\u7684\u306b\u306finclude_line_head_charas?(chara)<\/code>\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n

    22\u884c\u76ee kana_list_line<\/strong>
    \n\u3053\u3061\u3089\u3082kana_list<\/code>\u3092\u524a\u9664\u3057\u307e\u3059\u3002
    \nline<\/code>\u3060\u3051\u3060\u3068\u5206\u304b\u308a\u3065\u3089\u3044\u306e\u3067\u3001\u3042\u308a\u3075\u308c\u3066\u3044\u307e\u3059\u304cget_<\/code>\u3092\u4ed8\u3051\u3066\u3001get_line<\/code>\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n

    26\u884c\u76ee alphabetical_head_string<\/strong>
    \nalphabetical<\/code>\u3068\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u306e<\/code>\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002
    \n\u65e5\u672c\u8a9e\u306e50\u97f3<\/code>\u3001\u3092\u82f1\u8a9e\u306b\u5909\u63db\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u5c11\u3057\u7121\u7406\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u306d\u3002
    \n50\u97f3\u306e\u5404\u884c\u306e\u5148\u982d\u6587\u5b57<\/code>\u3068\u3044\u3046\u306e\u3092\u8868\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u5c11\u3057\u8aac\u660e\u4e0d\u8db3\u3068\u8aa4\u89e3\u3092\u4e0e\u3048\u3066\u3057\u307e\u3046\u3053\u3068\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
    \nalphabetical<\/code>\u3092\u5927\u80c6\u306b\u524a\u9664\u3057\u3066\u3001get_line_head_chara<\/code>\u3068\u3057\u3001\u884c\u306e\u5148\u982d\u6587\u5b57\u3092\u53d6\u5f97\u3059\u308b<\/code>\u3068\u3044\u3046\u610f\u5473\u3092\u6301\u305f\u305b\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n

    \u305d\u306e\u4ed6<\/strong>
    \n\u5f15\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u540d\u306e\u4e2d\u306e\u6587\u5b57\u5217<\/code>\u306fstr<\/code>\u3001\u4e00\u6587\u5b57<\/code>\u306fchara<\/code>\u3068\u3057\u307e\u3057\u305f\u3002
    \nchara<\/code>\u3068\u3044\u3044\u306a\u304c\u3089\u3082ka<\/code>\u306a\u3069\u3092\u8fd4\u3057\u3066\u3044\u305f\u308a\u3059\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u30af\u30e9\u30b9\u306fKatakana<\/code>\u30af\u30e9\u30b9\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3042\u304f\u307e\u3067\u3082\u65e5\u672c\u8a9e\u306e\u610f\u5473\u3067\u306e\u4e00\u6587\u5b57\u3068\u3044\u3046\u610f\u5473\u3067ka<\/code>\u306a\u3069\u3082\u4e00\u6587\u5b57\u3068\u307f\u306a\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n

    \u6574\u5f62\u5f8c<\/h3>\n
    # \u30ab\u30bf\u30ab\u30ca\u30af\u30e9\u30b9\nclass Katakana\n  LIST = { a: %w(\u30a2 \u30a4 \u30a6 \u30a8 \u30aa),\n           ka: %w(\u30ab \u30ad \u30af \u30b1 \u30b3 \u30ac \u30ae \u30b0 \u30b2 \u30b4),\n           sa: %w(\u30b5 \u30b7 \u30b9 \u30bb \u30bd \u30b6 \u30b8 \u30ba \u30bc \u30be),\n           ta: %w(\u30bf \u30c1 \u30c4 \u30c6 \u30c8 \u30c0 \u30c2 \u30c5 \u30c7 \u30c9),\n           na: %w(\u30ca \u30cb \u30cc \u30cd \u30ce),\n           ha: %w(\u30cf \u30d2 \u30d5 \u30d8 \u30db \u30d0 \u30d3 \u30d6 \u30d9 \u30dc \u30d1 \u30d4 \u30d7 \u30da \u30dd),\n           ma: %w(\u30de \u30df \u30e0 \u30e1 \u30e2),\n           ya: %w(\u30e4 \u30e6 \u30e8),\n           ra: %w(\u30e9 \u30ea \u30eb \u30ec \u30ed),\n           wa: %w(\u30ef \u30f0 \u30f1 \u30f2 \u30f3) }\n\n  def self.include_line_head_charas?(chara)\n    LIST.key?(chara.to_sym)\n  end\n\n  def self.get_line(chara)\n    LIST[chara.to_sym]\n  end\n\n  def self.get_line_head_chara(str)\n    LIST.each do |key, val|\n      return key.to_s if val.include?(str[0])\n    end\n    ''\n  end\nend<\/code><\/pre>\n

    \u307e\u3068\u3081<\/h2>\n

    \u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3068\u3044\u3046\u3053\u3068\u306f\u5965\u304c\u6df1\u3044\u3067\u3059\u3057\u3001\u7d42\u308f\u308a\u304c\u7121\u3044\u4f5c\u696d\u306e\u3088\u3046\u306b\u3082\u601d\u3044\u307e\u3059\u3002
    \n\u5f0a\u793e\u3067\u306f\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u643a\u308f\u308b\u95a2\u4fc2\u30e1\u30f3\u30d0\u30fc\u306b\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3092\u3057\u3066\u3082\u3089\u3044\u307e\u3059\u304c\u3001\u4f55\u6545\u305d\u306e\u540d\u524d\u306b\u3057\u305f\u306e\u304b\u3001\u7121\u99c4\u306f\u7121\u3044\u304b\u306a\u3069\u3001\u6fc0\u3057\u304f\u30c4\u30c3\u30b3\u30df\u3092\u53d7\u3051\u307e\u3059\u306e\u3067\u6c17\u3092\u4ed8\u3051\u308b\u7656\u304c\u81ea\u7136\u3068\u8eab\u306b\u4ed8\u3044\u3066\u304d\u305f\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002
    \n\u5927\u4e8b\u306a\u3053\u3068\u306f\u3001\u65e5\u3005\u8003\u3048\u306a\u304c\u3089\u5c11\u3057\u3067\u3082\u826f\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u308b\u3088\u3046\u306b\u52aa\u529b\u3059\u308b\u3053\u3068\u3060\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u308c\u304b\u3089\u3082\u9811\u5f35\u308a\u307e\u3059\uff01<\/p>\n

    \u30ea\u30fc\u30c0\u30d6\u30eb\u30b3\u30fc\u30c9\u3092\u610f\u8b58\u3057\u305f\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u3084\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a<\/a>\u3092\u3054\u691c\u8a0e\u306e\u4f01\u696d\u69d8\u306f\u3001\u662f\u975eMMM\u306b\u3054\u76f8\u8ac7\u4e0b\u3055\u3044\u307e\u305b\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u30ec\u30fc\u30eb\u306e\u4e0a\u306e\u30eb\u30d3\u30fc\u304c\u597d\u304d\u306a\u524d\u7530\u3067\u3059\u3002 \u6885\u96e8\u3067\u96e8\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u3002 \u4e3b\u306a\u79fb\u52d5\u624b\u6bb5\u304c\u81ea\u8ee2\u8eca\u306a\u79c1\u3068\u3057\u3066\u306f\u8f9b\u3044\u6642\u671f\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u73fe\u5728\u3001\u30ea\u30fc\u30c0\u30d6\u30eb\u30b3\u30fc\u30c9\uff08\u30aa\u30e9\u30a4\u30ea\u30fc\u30fb\u30b8\u30e3\u30d1\u30f3\uff09\u3092\u518d\u8aad\u3057\u3066\u3044\u307e\u3059\u3002 \u9032\u884c\u4e2d\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u540d\u3084\u5909\u6570\u540d\u306b\u60a9\u3080\u3053\u3068\u304c\u591a\u304b\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u53c2\u8003\u306b\u306a\u308c\u3070\u3068\u518d\u8aad\u3057\u3066\u3044\u308b\u6b21\u7b2c\u3067\u3059\u3002 \u547d\u540d\u306e\u5927\u5207\u3055 \u5fd9\u3057\u3044\u304b\u3089\u3001\u3081\u3093\u3069\u304f\u3055\u3044\u304b\u3089\u3001\u3068\u3064\u3044\u3064\u3044\u547d\u540d\u306b\u5bfe\u3057\u3066\u758e\u304b\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u3087\u3046\u304b\u3002 \u30d7\u30ed […]<\/p>\n","protected":false},"author":1,"featured_media":684,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[42],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/175"}],"collection":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":1,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"predecessor-version":[{"id":3330,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/175\/revisions\/3330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}