{"blog_url":"https://hatyuki.hatenablog.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhatyuki.hatenablog.jp%2Fentry%2F2015%2F10%2F07%2F141342\" title=\" Ruby \u3067 is_numeric - \u306f\u3061\u3085\u306b\u3063\u304d\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","author_name":"magicalhat","author_url":"https://blog.hatena.ne.jp/magicalhat/","blog_title":"\u306f\u3061\u3085\u306b\u3063\u304d","url":"https://hatyuki.hatenablog.jp/entry/2015/10/07/141342","description":"PHP \u306e is_numeric( ) \u307f\u305f\u3044\u306a\u306e\u3092 Ruby \u3067\u3084\u308b\u5834\u5408\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3044\u3044\u306e\u304b\u306a\u30fc\uff1f def numeric? (value) return true if value.kind_of?(Numeric) !!(Integer(value) rescue Float(value)) rescue false end \u3053\u308c\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c6\u30b9\u30c8\u3057\u3066\u307f\u305f\u3089\u3001\u3060\u3044\u305f\u3044 OK \u306a\u6c17\u304c\u3059\u308b\u3002 require 'minitest/autorun' class TestNumeric < Minitest::Test def test_numeric assert_equal(true, \u2026","type":"rich","height":"190","title":" Ruby \u3067 is_numeric","provider_url":"https://hatena.blog","published":"2015-10-07 14:13:42","categories":["Ruby"],"width":"100%","provider_name":"Hatena Blog","image_url":null}