{"id":5238,"date":"2020-04-18T11:50:54","date_gmt":"2020-04-18T02:50:54","guid":{"rendered":"https:\/\/yumishin.com\/?p=5238"},"modified":"2020-04-18T11:50:54","modified_gmt":"2020-04-18T02:50:54","slug":"ruby-test-silver","status":"publish","type":"post","link":"https:\/\/yumishin.com\/?p=5238","title":{"rendered":"\u3010Ruby\u8cc7\u683c\u8a66\u9a13Silver\u3011\u6a21\u64ec\u554f\u984c\u3067\u8abf\u3079\u305f\u3053\u3068\u306e\u307e\u3068\u3081\uff081-10\uff09"},"content":{"rendered":"<p>\u4eca\u56de\u306fRuby\u306e\u8cc7\u683c\u8a66\u9a13Silver\u306e\u6a21\u64ec\u554f\u984c\u3067\u8abf\u3079\u305f\u3053\u3068\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u6a21\u64ec\u554f\u984c\u306f\u4ee5\u4e0b\u306eURL\u304b\u3089\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>  <a class=\"reference table\" href=\"https:\/\/gist.github.com\/sean2121\/945035ef2341f0c39bf40762cd8531e0\" rel=\"noopener noreferrer\"><br \/>\n    <span class=\"tbcell refttl\">\u53c2\u8003<\/span><br \/>\n    <span class=\"tbcell refcite\">silver_j.md<span>GitHub<\/span><\/span><br \/>\n  <\/a><\/p>\n<h2 id=\"i-0\">\u3010Ruby\u8cc7\u683c\u8a66\u9a13Silver\u3011\u6a21\u64ec\u554f\u984c\u3067\u8abf\u3079\u305f\u3053\u3068\u306e\u307e\u3068\u3081\uff081-10\uff09<\/h2>\n<h4 id=\"i-1\">\u554f\u984c1<\/h4>\n<p><span class=\"haiiro\">super<\/span>\u306f\u30b9\u30fc\u30d1\u30fc\u30af\u30e9\u30b9\u306e\u540c\u540d\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u4e88\u7d04\u8a9e<\/p>\n<p><span class=\"haiiro\">begin<\/span>\u306f\u4f8b\u5916\u51e6\u7406\u306e\u969b\u306b\u4f7f\u308f\u308c\u308b\u4e88\u7d04\u8a9e<\/p>\n<p><span class=\"haiiro\">try<\/span>\u3001<span class=\"haiiro\">goto<\/span>\u306e\u3088\u3046\u306a\u4e88\u7d04\u8a9e\u306f\u306a\u3044<\/p>\n<h4 id=\"i-2\">\u554f\u984c2<\/h4>\n<p>\u53ef\u5909\u9577\u5f15\u6570\uff08rest\u5f15\u6570\uff09\u306b\u3064\u3044\u3066\u78ba\u8a8d<\/p>\n<h4 id=\"i-3\">\u554f\u984c3<\/h4>\n<p>Hash\u306e\u500b\u6570\u3092\u6570\u3048\u308b\u306e\u304csize\u30e1\u30bd\u30c3\u30c9<\/p>\n<h4 id=\"i-4\">\u554f\u984c4<\/h4>\n<p><span class=\"haiiro\">Time.now<\/span>\u3067\u73fe\u5728\u6642\u523b\u306e\u53d6\u5f97\u304c\u53ef\u80fd<\/p>\n<p>Time\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u6642\u9593\u3092\u52a0\u7b97\u53ef\u80fd\uff0860 * 60 * 24\u306724\u6642\u9593\u52a0\u7b97\uff09<\/p>\n<p>&nbsp;<\/p>\n<div class=\"memo \">\n<div class=\"memo_ttl dfont\"> MEMO<\/div>\n<p>Time.mktime\u3067\u6307\u5b9a\u6642\u523b\u306e\u4f5c\u6210\u304c\u53ef\u80fd<\/p>\n<p><span class=\"haiiro\">Time.mktime( year[, month [, day [, hour [, min [, sec [, usec ]]]]]] )<\/span><\/p>\n<\/div>\n<h4 id=\"i-5\">\u554f\u984c5<\/h4>\n<p>\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306e\u6700\u521d\u306e\u6587\u5b57\u306f\u3001\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u304b\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc\u306a\u3089OK<\/p>\n<p>\u6570\u5b57\u3084\u4e88\u7d04\u8a9e\u306f\u4f7f\u3048\u306a\u3044<\/p>\n<h4 id=\"i-6\">\u554f\u984c6<\/h4>\n<p><span class=\"haiiro\">each_with_index<\/span>\u306e\u4f7f\u3044\u65b9\u3092\u53c2\u7167<\/p>\n<h4 id=\"i-7\">\u554f\u984c7<\/h4>\n<p><span class=\"haiiro\">downto<\/span>\u3068<span class=\"haiiro\">select<\/span>\u306e\u4f7f\u3044\u65b9\u3092\u53c2\u7167<\/p>\n<h4 id=\"i-8\">\u554f\u984c8<\/h4>\n<p>Enumerable\u306e\u30a8\u30a4\u30ea\u30a2\u30b9\u30e1\u30bd\u30c3\u30c9\u307e\u3068\u3081<\/p>\n<ul>\n<li>detect = find<\/li>\n<li>collect = map<\/li>\n<li>inject = reduce<\/li>\n<li>find_all = select<\/li>\n<li>include? = menber?<\/li>\n<\/ul>\n<p>compact\u306f\u914d\u5217\u306e\u4e2d\u304b\u3089\u8981\u7d20\u304cnil\u306e\u3082\u306e\u3092\u53d6\u308a\u9664\u304f<\/p>\n<p>flatten\u306f\u914d\u5217\u306e\u4e2d\u306b\u914d\u5217\u304c\u3042\u308b\u3088\u3046\u306a\u5165\u308c\u5b50\u69cb\u9020\u3092\u5c55\u958b\u3057\u3066\u3001\u3072\u3068\u3064\u306e\u5927\u304d\u306a\u914d\u5217\u306b\u3059\u308b<\/p>\n<h4 id=\"i-9\">\u554f\u984c9<\/h4>\n<p>String#delete\u306fself\uff08\u30ec\u30b7\u30fc\u30d0\u30fc\u306b\u306a\u3063\u3066\u3044\u308b\u90e8\u5206\uff09\u306b\u542b\u307e\u308c\u308b\u6587\u5b57\u5217\u3092\u53d6\u308a\u9664\u3044\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059<\/p>\n<h4 id=\"i-10\">\u554f\u984c10<\/h4>\n<p>\u30d2\u30a2\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u4f7f\u3044\u65b9\u53c2\u7167<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306fRuby\u306e\u8cc7\u683c\u8a66\u9a13Silver\u306e\u6a21\u64ec\u554f\u984c\u3067\u8abf\u3079\u305f\u3053\u3068\u306b\u3064\u3044\u3066\u7c21\u5358\u306b\u307e\u3068\u3081\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u6a21\u64ec\u554f\u984c\u306f\u4ee5\u4e0b\u306eURL\u304b\u3089\u53c2\u7167\u3067\u304d\u307e\u3059\u3002 \u3010Ruby\u8cc7\u683c\u8a66\u9a13Silver\u3011\u6a21\u64ec\u554f\u984c\u3067\u8abf\u3079\u305f\u3053\u3068\u306e\u307e\u3068\u3081\uff081-10\uff09 \u554f &#8230; <\/p>\n","protected":false},"author":1,"featured_media":5239,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[272],"tags":[],"class_list":{"0":"post-5238","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing","8":"entry"},"_links":{"self":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/5238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5238"}],"version-history":[{"count":1,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/5238\/revisions"}],"predecessor-version":[{"id":5240,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/5238\/revisions\/5240"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/media\/5239"}],"wp:attachment":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}