{"id":20752,"date":"2017-04-03T15:18:35","date_gmt":"2017-04-03T06:18:35","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=20752"},"modified":"2024-05-06T11:41:17","modified_gmt":"2024-05-06T02:41:17","slug":"%e3%80%90%e3%82%a8%e3%83%b3%e3%82%b8%e3%83%8b%e3%82%a2%e7%9b%a3%e4%bf%ae%e3%80%91nilemptyblankpresent%e3%82%92%e5%ae%8c%e5%85%a8%e6%af%94%e8%bc%83%e3%81%97%e3%81%9f%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/20752","title":{"rendered":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01Web\u30b3\u30fc\u30c0\u30fc\u30fb\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u8c9d\u539f\uff08<a href=\"https:\/\/twitter.com\/touhicomu\" target=\"_blank\" rel=\"noopener\">@touhicomu<\/a>\uff09\u3067\u3059\u3002<\/p>\n<p>\u4eca\u65e5\u306f\u3001<span style=\"color: #339966\"><strong>Ruby<\/strong><\/span>\u306e<span style=\"color: #339966\"><strong>blank?\u3001present?\u3001nil?\u3001empty?<\/strong><\/span>\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<\/p>\n<ul>\n<li><span style=\"color: #ff0000\"><strong>blank?\u3001present?\u3001nil?\u3001empty?\u3068\u306f<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>blank?\u3001present\uff1f\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u65b9\u6cd5<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>blank?\u3001present?\u3001nil?\u3001empty?\u306b\u3088\u308b\u5224\u5b9a<\/strong><\/span><\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\u57fa\u672c\u7684\u306a\u5185\u5bb9\u304b\u3089\u3001<\/p>\n<ul>\n<li><span style=\"color: #ff0000\"><strong>\u5f8c\u7f6eif\u3001\u5f8c\u7f6eunless\u3068blank?\u306e\u7d44\u307f\u5408\u308f\u305b<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>Array\u3068Hash\u304b\u3089blank?\u306a\u5024\u3092\u53d6\u308a\u9664\u304f\u65b9\u6cd5<\/strong><\/span><\/li>\n<\/ul>\n<p>\u306a\u3069\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9\u306b\u95a2\u3057\u3066\u3082\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u3001<span style=\"color: #339966\"><strong>Ruby<\/strong><\/span>\u306e<span style=\"color: #339966\"><strong>blank?\u3001present?\u3001nil?\u3001empty?<\/strong><\/span>\u306e\u4f7f\u3044\u65b9\u3092\u3088\u304f\u628a\u63e1\u3057\u3066\u81ea\u5206\u306e\u30b9\u30ad\u30eb\u3068\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h2>blank?\u3001present?\u3001nil?\u3001empty?\u3068\u306f<\/h2>\n<p><span style=\"color: #339966\"><strong>blank?\u3001present?\u3001nil?\u3001empty?<\/strong><\/span>\u306f\u3001\u305d\u308c\u305d\u308c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u9055\u3044\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n<table id=\"tablepress-169\" class=\"tablepress tablepress-id-169\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">\u30e1\u30bd\u30c3\u30c9<\/th><th class=\"column-2\">\u30e1\u30bd\u30c3\u30c9\u306e\u610f\u5473<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">nil?<\/td><td class=\"column-2\">\u5909\u6570\u306e\u5024\u304cnil\u307e\u305f\u306f\u3001\u5024\u306a\u3057\u306e\u5834\u5408\u3001\u771f\u3068\u306a\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">empty?<\/td><td class=\"column-2\">\u5909\u6570\u306e\u5024\u304c\"\"\uff08\u6587\u5b57\u5217\u306e\u5834\u5408\uff09\u3084\u5024\u304c\u7a7a\u767d\u306e\u5834\u5408\u3001\u771f\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\nnil?\u3068\u306e\u9055\u3044\u306f\u3001empty?\u306f\u5909\u6570\u306e\u5024\u306f\u3042\u308b\u3053\u3068\u306f\u3042\u308b\u304c\u3001\u305d\u306e\u5024\u304c\u7a7a\u3092\u793a\u3057\u3066\u3044\u308b\u3001\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">blank?<\/td><td class=\"column-2\">nil?\u304c\u771f\u3068\u306a\u308b\u5834\u5408\u3001\u307e\u305f\u306f\u3001empty?\u304c\u771f\u3068\u306a\u308b\u5834\u5408\u306b\u3001blank?\u306f\u771f\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u7c21\u5358\u306b\u8a00\u3048\u3070\u3001blank?\u306f\u5024\u3068\u3044\u3048\u308b\u3082\u306e\u304c\u306a\u3044\u5834\u5408\u3001\u771f\u3068\u306a\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">present?<\/td><td class=\"column-2\">present?\u306f\u3001blank?\u5168\u304f\u9006\u306e\u52d5\u4f5c\u3092\u3057\u307e\u3059\u3002present?\u306f\u3001\u5024\u3068\u3044\u3048\u308b\u3082\u306e\u304c\u3042\u308b\u5834\u5408\u3001\u771f\u3068\u306a\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-169 from cache -->\n<p>\u6b21\u7bc0\u4ee5\u964d\u3067\u3001\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3067\u5224\u5b9a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>blank?\u3001present\uff1f\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u65b9\u6cd5<\/h2>\n<p><span style=\"color: #339966\"><strong>blank?<\/strong><\/span>\u3001<span style=\"color: #339966\"><strong>present?<\/strong><\/span>\u306f\u3001<span style=\"color: #339966\"><strong>ActiveSupport<\/strong><\/span>\u3068\u3044\u3046<span style=\"color: #339966\"><strong>gem<\/strong><\/span>\u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u3001ActiveSupport\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ gem install activesupport<\/pre>\n<p>\u307e\u305f\u3001ActiveSupport\u3092\u4f7f\u3046\u306b\u306f\u3001<\/p>\n<pre class=\"lang:ruby decode:true \">require \u2018active_support\/all\u2019<\/pre>\n<p>\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\nval = &quot;&quot;\r\n\r\nif val.present?\r\n  p &quot;val is presented&quot;\r\nelse\r\n  p &quot;val is not presented&quot;\r\nend<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&quot;val is not presented&quot;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5b9f\u884c\u7d50\u679c\u306b\u306a\u308c\u3070\u3001ActiveSupport\u304c\u304d\u3061\u3093\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u3066\u3001present?\u3001blank?\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>blank?\u3001present?\u3001nil?\u3001empty?\u306e\u4f7f\u3044\u65b9\u6bd4\u8f03<\/h2>\n<p>\u4ee5\u4e0b\u3001<span style=\"color: #339966\"><strong>nil?\u3001empty?\u3001blank?\u3001present?<\/strong><\/span>\u306b\u3064\u3044\u3066\u3001\u305d\u308c\u305e\u308c\u3069\u306e\u3088\u3046\u306a\u7a7a\u306e\u5024\u306e\u5224\u5b9a\u7d50\u679c\u306b\u306a\u308b\u306e\u304b\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u306a\u304a\u3001nil?\u3001empty?\u3001blank?\u3001present?\u306e\u9806\u3067\u89e3\u8aac\u3057\u305f\u65b9\u304c\u7406\u89e3\u304c\u3057\u3084\u3059\u3044\u305f\u3081\u3001\u3053\u306e\u9806\u756a\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>nil?\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a<\/h3>\n<p><span style=\"color: #339966\"><strong>nil?<\/strong><\/span>\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\nv1 = nil\r\nv2 = true\r\nv3 = false\r\nv4 = []\r\nv5 = [0]\r\nv6 = 100\r\nv7 = &quot;&quot;\r\nv8 = &quot;0&quot;\r\nv9 = &quot;100&quot;\r\n\r\np &quot;---- nil? ----&quot;\r\np &quot;nil.nil? = &quot; + v1.nil?.to_s\r\np &quot;#{v2}.nil? = &quot; + v2.nil?.to_s\r\np &quot;#{v3}.nil? = &quot; + v3.nil?.to_s\r\np &quot;#{v4}.nil? = &quot; + v4.nil?.to_s\r\np &quot;#{v5}.nil? = &quot; + v5.nil?.to_s\r\np &quot;#{v6}.nil? = &quot; + v6.nil?.to_s\r\np &quot;'#{v7}'.nil? = &quot; + v7.nil?.to_s\r\np &quot;'#{v8}'.nil? = &quot; + v8.nil?.to_s\r\np &quot;'#{v9}'.nil? = &quot; + v9.nil?.to_s<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&quot;---- nil? ----&quot;\r\n&quot;nil.nil? = true&quot;\r\n&quot;true.nil? = false&quot;\r\n&quot;false.nil? = false&quot;\r\n&quot;[].nil? = false&quot;\r\n&quot;[0].nil? = false&quot;\r\n&quot;100.nil? = false&quot;\r\n&quot;''.nil? = false&quot;\r\n&quot;'0'.nil? = false&quot;\r\n&quot;'100'.nil? = false&quot;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001nil?\u306f\u3001<span style=\"color: #0000ff\"><strong>\u5024\u304cnil\u306e\u5834\u5408<\/strong><\/span>\u306f<span style=\"color: #339966\"><strong>true<\/strong><\/span>\u3001<span style=\"color: #0000ff\"><strong>nil\u4ee5\u5916\u306e\u5834\u5408<\/strong><\/span>\u306f\u3059\u3079\u3066<span style=\"color: #339966\"><strong>false<\/strong><\/span>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>nil<\/strong><\/span>\u3068\u306fRuby\u306b\u304a\u3044\u3066\u300c<span style=\"color: #0000ff\"><strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5b58\u5728\u3057\u306a\u3044<\/strong><\/span>\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3001\u4ed6\u306e\u5024\u306f\u3059\u3079\u3066\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001nil\u3068nil\u3067\u306a\u3044\u3082\u306e\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3059\u3079\u3066\uff09\u3068\u306f\u3001\u53b3\u5bc6\u306b\u533a\u5225\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>empty?\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a<\/h3>\n<p><span style=\"color: #339966\"><strong>empty?<\/strong><\/span>\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\nv1 = nil\r\nv2 = true\r\nv3 = false\r\nv4 = []\r\nv5 = [0]\r\nv6 = 100\r\nv7 = &quot;&quot;\r\nv8 = &quot;0&quot;\r\nv9 = &quot;100&quot;\r\n\r\np &quot;---- empty? ----&quot;\r\n#p &quot;nil.empty? = &quot; + v1.empty?.to_s #=&gt; undefined method `empty?' for nil:NilClass (NoMethodError)\r\n#p &quot;#{v2}.empty? = &quot; + v2.empty?.to_s #=&gt; undefined method `empty?' for true:TrueClass (NoMethodError)\r\n#p &quot;#{v3}.empty? = &quot; + v3.empty?.to_s #=&gt; undefined method `empty?' for false:FalseClass (NoMethodError)\r\np &quot;#{v4}.empty? = &quot; + v4.empty?.to_s\r\np &quot;#{v5}.empty? = &quot; + v5.empty?.to_s\r\n#p &quot;#{v6}.empty? = &quot; + v6.empty?.to_s #=&gt; undefined method `empty?' for 100:Fixnum (NoMethodError)\r\np &quot;'#{v7}'.empty? = &quot; + v7.empty?.to_s\r\np &quot;'#{v8}'.empty? = &quot; + v8.empty?.to_s\r\np &quot;'#{v9}'.empty? = &quot; + v9.empty?.to_s<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&quot;---- empty? ----&quot;\r\n&quot;[].empty? = true&quot;\r\n&quot;[0].empty? = false&quot;\r\n&quot;''.empty? = true&quot;\r\n&quot;'0'.empty? = false&quot;\r\n&quot;'100'.empty? = false&quot;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5b9f\u884c\u7d50\u679c\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>empty?\u306f\u3001<span style=\"color: #ff0000\"><strong>nil\u3084true\u3001false\u3001\u6574\u6570\uff08Fixnum\uff09\u306b\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>empty?\u306f\u300c<span style=\"color: #0000ff\"><strong>\u5024\u304c\u7a7a\u3067\u3042\u308b<\/strong><\/span>\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u306e\u3067\u3001<span style=\"color: #0000ff\"><strong>\u5024\u304c\u7a7a\u306b\u306a\u308b\u3053\u3068\u306e\u306a\u3044<\/strong><\/span>\u3001nil\u3001true\u3001false\u3001\u6574\u6570\uff08Fixnum\uff09\u306b\u4f7f\u7528\u3059\u308b\u3068\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001<span style=\"color: #339966\"><strong>\u914d\u5217<\/strong><\/span>\u3084<span style=\"color: #339966\"><strong>\u6587\u5b57\u5217<\/strong><\/span>\u306e<span style=\"color: #0000ff\"><strong>\u5024\u304c\u7a7a\u3067\u3042\u308b\u5834\u5408<\/strong><\/span>\u306b\u306f\u3001empty?\u306f<span style=\"color: #339966\"><strong>true<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u306b\u306f\u6319\u3052\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u30cf\u30c3\u30b7\u30e5\u304c\u7a7a\u306e\u5834\u5408\u3082empty?\u306ftrue\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #0000ff\"><strong>\u7a7a\u3067\u306a\u3044\u5834\u5408<\/strong><\/span>\u306fempty?\u306f<span style=\"color: #339966\"><strong>false<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>blank?\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a<\/h3>\n<p><span style=\"color: #339966\"><strong>blank?<\/strong><\/span>\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\nv1 = nil\r\nv2 = true\r\nv3 = false\r\nv4 = []\r\nv5 = [0]\r\nv6 = 100\r\nv7 = &quot;&quot;\r\nv8 = &quot;0&quot;\r\nv9 = &quot;100&quot;\r\n\r\np &quot;---- blank? ----&quot;\r\np &quot;nil.blank? = &quot; + v1.blank?.to_s\r\np &quot;#{v2}.blank? = &quot; + v2.blank?.to_s\r\np &quot;#{v3}.blank? = &quot; + v3.blank?.to_s\r\np &quot;#{v4}.blank? = &quot; + v4.blank?.to_s\r\np &quot;#{v5}.blank? = &quot; + v5.blank?.to_s\r\np &quot;#{v6}.blank? = &quot; + v6.blank?.to_s\r\np &quot;'#{v7}'.blank? = &quot; + v7.blank?.to_s\r\np &quot;'#{v8}'.blank? = &quot; + v8.blank?.to_s\r\np &quot;'#{v9}'.blank? = &quot; + v9.blank?.to_s<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&quot;---- blank? ----&quot;\r\n&quot;nil.blank? = true&quot;\r\n&quot;true.blank? = false&quot;\r\n&quot;false.blank? = true&quot;\r\n&quot;[].blank? = true&quot;\r\n&quot;[0].blank? = false&quot;\r\n&quot;100.blank? = false&quot;\r\n&quot;''.blank? = true&quot;\r\n&quot;'0'.blank? = false&quot;\r\n&quot;'100'.blank? = false&quot;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5b9f\u884c\u7d50\u679c\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>blank?\u306f\u57fa\u672c\u7684\u306b\u306f\u300c<span style=\"color: #339966\"><strong>nil? or empty?<\/strong><\/span>\u300d\u3068<span style=\"color: #0000ff\"><strong>\u4f3c\u305f\u3088\u3046\u306a\u7d50\u679c<\/strong><\/span>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>true\u3001false<\/strong><\/span>\u306f\u3001<span style=\"color: #0000ff\"><strong>nil?\u3067\u306ffalse<\/strong><\/span>\u3001<span style=\"color: #0000ff\"><strong>empty?\u3067\u306f\u30a8\u30e9\u30fc<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001blank?\u3067\u306f<span style=\"color: #0000ff\"><strong>true\u306e\u5834\u5408\u306ffalse\u3001false\u306e\u5834\u5408\u306ftrue<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u300c<span style=\"color: #0000ff\"><strong>\u7a7a<\/strong><\/span>\u300d\u3068\u3044\u3046\u610f\u5473\u306eblank?\u3068\u3057\u3066\u610f\u5473\u304c\u5408\u3063\u3066\u3044\u308b\u7d50\u679c\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<span style=\"color: #339966\"><strong>\u7a7a\u306e\u914d\u5217<\/strong><\/span>\u3001<span style=\"color: #339966\"><strong>\u7a7a\u306e\u6587\u5b57\u5217<\/strong><\/span>\u3067\u3082blank?\u306f<span style=\"color: #339966\"><strong>true<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3082\u300c\u7a7a\u300d\u3068\u3044\u3046\u610f\u5473\u3068\u3057\u3066\u5408\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>present?\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a<\/h3>\n<p><span style=\"color: #339966\"><strong>present?<\/strong><\/span>\u306b\u3088\u308b\u5024\u306e\u5224\u5b9a\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\n\r\nv1 = nil\r\nv2 = true\r\nv3 = false\r\nv4 = []\r\nv5 = [0]\r\nv6 = 100\r\nv7 = &quot;&quot;\r\nv8 = &quot;0&quot;\r\nv9 = &quot;100&quot;\r\n\r\n\r\np &quot;---- present? ----&quot;\r\np &quot;nil.present? = &quot; + v1.present?.to_s\r\np &quot;#{v2}.present? = &quot; + v2.present?.to_s\r\np &quot;#{v3}.present? = &quot; + v3.present?.to_s\r\np &quot;#{v4}.present? = &quot; + v4.present?.to_s\r\np &quot;#{v5}.present? = &quot; + v5.present?.to_s\r\np &quot;#{v6}.present? = &quot; + v6.present?.to_s\r\np &quot;'#{v7}'.present? = &quot; + v7.present?.to_s\r\np &quot;'#{v8}'.present? = &quot; + v8.present?.to_s\r\np &quot;'#{v9}'.present? = &quot; + v9.present?.to_s<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&quot;---- present? ----&quot;\r\n&quot;nil.present? = false&quot;\r\n&quot;true.present? = true&quot;\r\n&quot;false.present? = false&quot;\r\n&quot;[].present? = false&quot;\r\n&quot;[0].present? = true&quot;\r\n&quot;100.present? = true&quot;\r\n&quot;''.present? = false&quot;\r\n&quot;'0'.present? = true&quot;\r\n&quot;'100'.present? = true&quot;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306a\u5b9f\u884c\u7d50\u679c\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306bpresent?\u306f\u3001<span style=\"color: #0000ff\"><strong>!blank?\u3068\u7b49\u4fa1\u306a\u5224\u5b9a<\/strong><\/span>\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #0000ff\"><strong>blank?\u3067\u306ftrue<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u305f\u3001<span style=\"color: #339966\"><strong>nil\u3001false\u3001\u7a7a\u306e\u914d\u5217\u3001\u7a7a\u306e\u6587\u5b57\u5217<\/strong><\/span>\u306b\u306f\u3001<span style=\"color: #0000ff\"><strong>present?\u306ffalse<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001<span style=\"color: #0000ff\"><strong>blank?\u3067false<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u305f\u5024\u306e\u3042\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u3001<span style=\"color: #0000ff\"><strong>present?\u306ftrue<\/strong><\/span>\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u5f8c\u7f6eif\u3001\u5f8c\u7f6eunless\u3068blank?\u306e\u7d44\u307f\u5408\u308f\u305b<\/h2>\n<h3>if\u6587\u3001\u5f8c\u7f6eif\u3068blank?<\/h3>\n<p>\u901a\u5e38\u3001<span style=\"color: #339966\"><strong>blank?<\/strong><\/span>\u3092\u4f7f\u7528\u3059\u308b\u969b\u306f\u3001<span style=\"color: #339966\"><strong>if\u6587\u306e\u6761\u4ef6\u5f0f<\/strong><\/span>\u306bblank?\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\npage = &quot;&lt;title&gt;hello, world&lt;\/title&gt;&quot;\r\n\r\nif page.blank?\r\n  page = &quot;&lt;title&gt;default page&lt;\/title&gt;&quot;\r\nend\r\n\r\nputs page<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&lt;title&gt;hello, world&lt;\/title&gt;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u4f8b\u3067\u306f\u3001page\u5909\u6570\u304c\u7a7a\u306e\u5834\u5408\u306f<span style=\"color: #0000ff\"><strong>\u30c7\u30d5\u30a9\u30eb\u30c8\u5024<\/strong><\/span>\u3001\u7a7a\u3067\u306a\u3044\u5834\u5408\u306f<span style=\"color: #0000ff\"><strong>\u305d\u306e\u307e\u307e\u306e\u5024<\/strong><\/span>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u5c11\u3057\u5fdc\u7528\u7684\u306a\u4f8b\u3068\u3057\u3066<span style=\"color: #339966\"><strong>\u5f8c\u7f6eif<\/strong><\/span>\u3092\u4f7f\u3063\u3066blank?\u3092\u4f75\u7528\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\npage = &quot;&lt;title&gt;hello, world&lt;\/title&gt;&quot;\r\n\r\npage = &quot;&lt;title&gt;default page&lt;\/title&gt;&quot; if page.blank?\r\n\r\nputs page<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&lt;title&gt;hello, world&lt;\/title&gt;<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u3082\u3001page\u5909\u6570\u304c\u7a7a\u306e\u5834\u5408\u306f<span style=\"color: #0000ff\"><strong>\u30c7\u30d5\u30a9\u30eb\u30c8\u5024<\/strong><\/span>\u3001\u7a7a\u3067\u306a\u3044\u5834\u5408\u306f<span style=\"color: #0000ff\"><strong>\u305d\u306e\u307e\u307e\u306e\u5024<\/strong><\/span>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u5f8c\u7f6eif\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u5e7e\u5206\u304b<span style=\"color: #0000ff\"><strong>\u30b3\u30fc\u30c9\u304c\u7c21\u6f54<\/strong><\/span>\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001blank?\u7cfb\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001if\u3084elsif\u3001\u5f8c\u7f6eif\u306a\u3069\u305d\u306e\u6642\u3005\u3067\u9069\u5207\u306a\u4f7f\u7528\u306e\u3057\u304b\u305f\u3092\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u304c\u7c21\u6f54\u306b\u306a\u308a\u3001\u30b3\u30fc\u30c9\u304c\u8aad\u307f\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>unless\u6587\u3001\u5f8c\u7f6eunless\u3068blank?<\/h3>\n<p><span style=\"color: #339966\"><strong>unless<\/strong><\/span>\u3068<span style=\"color: #339966\"><strong>blank?<\/strong><\/span>\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3001\u5909\u6570\u304c<span style=\"color: #0000ff\"><strong>\u7a7a\u3067\u306a\u3044\u5834\u5408<\/strong><\/span>\u306bunless\u6587\u306e\u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306f\u3001<span style=\"color: #339966\"><strong>&lt;script&gt;\u30bf\u30b0<\/strong><\/span>\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>&lt;script&gt;\u30bf\u30b0\u306f\u3001src\u5c5e\u6027\u306b\u6307\u5b9a\u3055\u308c\u305f<span style=\"color: #339966\"><strong>JavaScript\u30d5\u30a1\u30a4\u30eb<\/strong><\/span>\u3092\u8aad\u307f\u8fbc\u3080\u30bf\u30b0\u3067\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001js\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u3042\u308bbootstrap.js\u3068jquery.js\u3068\u3044\u3046JavaScript\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080&lt;script&gt;\u30bf\u30b0\u3092\u6271\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\njs = '&lt;script src=&quot;js\/bootstrap.js&quot;&gt;&lt;\/script&gt;'\r\n\r\nunless js.blank?\r\n  js = '&lt;script src=&quot;js\/jquery.js&quot;&gt;&lt;\/script&gt;' + &quot;\\n&quot; + js\r\nend\r\n\r\nputs js<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&lt;script src=&quot;js\/jquery.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script src=&quot;js\/bootstrap.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001\u5909\u6570js\u304c<span style=\"color: #0000ff\"><strong>\u7a7a\u3067\u306a\u3044<\/strong><\/span>\u305f\u3081\u306b\u3001unless\u6587\u306e\u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u3001\u5143\u306e\u5909\u6570js\u306b\u65b0\u305f\u306b&lt;script&gt;\u30bf\u30b0\u304c<span style=\"color: #0000ff\"><strong>\u8ffd\u52a0<\/strong><\/span>\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092<span style=\"color: #339966\"><strong>\u5f8c\u7f6eunless<\/strong><\/span>\u306b\u7f6e\u304d\u63db\u3048\u3066\u307f\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\njs = '&lt;script src=&quot;js\/bootstrap.js&quot;&gt;&lt;\/script&gt;'\r\n\r\njs = '&lt;script src=&quot;js\/jquery.js&quot;&gt;&lt;\/script&gt;' + &quot;\\n&quot; + js unless js.blank?\r\n\r\nputs js<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">&lt;script src=&quot;js\/jquery.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script src=&quot;js\/bootstrap.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\u5f8c\u7f6eunless\u306e\u524d\u306e\u6587\u304c\u591a\u5c11\u9577\u304f\u3001\u5c11\u3057\u8aad\u307f\u306b\u304f\u3044\u3067\u3059\u304c\u3001<span style=\"color: #0000ff\"><strong>\u7c21\u6f54\u306a\u30b3\u30fc\u30c9<\/strong><\/span>\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305f\u3060\u3001\u5f8c\u7f6eif\u3001\u5f8c\u7f6eunless\u3068\u3082\u306b\u3001\u524d\u306e\u6587\u304c\u9577\u304f\u306a\u308b\u3068\u8aad\u307f\u306b\u304f\u304f\u306a\u308b\u305f\u3081\u3001\u305d\u306e\u6642\u3005\u3067\u9069\u5207\u306a\u3084\u308a\u65b9\u3092\u9078\u629e\u3055\u308c\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3042\u304f\u307e\u3067\u3001<span style=\"color: #0000ff\"><strong>\u30b3\u30fc\u30c9\u3092\u7c21\u6f54\u306b\u3057\u30c7\u30d0\u30c3\u30b0\u3084\u30c6\u30b9\u30c8\u3092\u3057\u3084\u3059\u304f<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u76ee\u7684\u3067\u3059\u3002<\/p>\n<h2>Array\u3068Hash\u304b\u3089blank?\u306a\u5024\u3092\u53d6\u308a\u9664\u304f\u65b9\u6cd5<\/h2>\n<h3>Array\u304b\u3089blank?\u306a\u5024\u3092\u53d6\u308a\u9664\u304f\u65b9\u6cd5<\/h3>\n<p><span style=\"color: #339966\"><strong>\u914d\u5217\uff08Array\uff09<\/strong><\/span>\u306e\u4e2d\u3067<span style=\"color: #339966\"><strong>blank?<\/strong><\/span>\u304ctrue\u3092\u8fd4\u3059\u7a7a\u306e\u5024\u306e\u8981\u7d20\u3092<span style=\"color: #0000ff\"><strong>\u53d6\u308a\u9664\u304f\u65b9\u6cd5<\/strong><\/span>\u3092\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>active_support\u306e<span style=\"color: #339966\"><strong>reject\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\narray = ['1st', nil, '', '4th', true, [], '7th']\r\n\r\np array.reject(&amp;:blank?)<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">[&quot;1st&quot;, &quot;4th&quot;, true, &quot;7th&quot;]<\/pre>\n<p>\u4ee5\u4e0a\u306e\u4f8b\u3067\u306f\u3001reject\u30e1\u30bd\u30c3\u30c9\u306bblank?\u306e\u30b7\u30f3\u30dc\u30eb\u3092Proc\u3068\u3057\u3066\u6e21\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u914d\u5217\uff08Array\uff09\u304b\u3089blank?\u304ctrue\u3092\u8fd4\u3059<span style=\"color: #0000ff\"><strong>\u7a7a\u306e\u5024\u3092\u53d6\u308a\u9664\u304f<\/strong><\/span>\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>blank?\u306e\u4ed6\u3001empty?\u306a\u3069\u3082\u6e21\u305b\u307e\u3059\u306e\u3067\u3001\u7686\u3055\u3093\u3067\u8a66\u3055\u308c\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>Hash\u304b\u3089blank?\u306a\u5024\u3092\u53d6\u308a\u9664\u304f\u65b9\u6cd5<\/h3>\n<p>\u914d\u5217\uff08Array\uff09\u3067\u306freject\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u3046\u307e\u304fblank?\u304ctrue\u3092\u8fd4\u3059\u5024\u3092\u53d6\u308a\u9664\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"color: #339966\"><strong>\u30cf\u30c3\u30b7\u30e5\uff08Hash\uff09<\/strong><\/span>\u3067\u306f\u3001\u914d\u5217\u3068\u9055\u3044\u3001<span style=\"color: #339966\"><strong>\u30ad\u30fc\u3068\u5024<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001<span style=\"color: #0000ff\"><strong>\u3069\u3061\u3089\u306e\u5024<\/strong><\/span>\u3092blank?\u3068\u5224\u5b9a\u3059\u308b\u306e\u304b\u3001reject\u30e1\u30bd\u30c3\u30c9\u306b<span style=\"color: #0000ff\"><strong>\u6307\u5b9a<\/strong><\/span>\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001reject\u30e1\u30bd\u30c3\u30c9\u306e<span style=\"color: #339966\"><strong>\u30d6\u30ed\u30c3\u30af<\/strong><\/span>\u306b\u3066\u3001\u30d6\u30ed\u30c3\u30af\u5f15\u6570\u306b\u6e21\u3055\u308c\u308b\u30ad\u30fc\u3068\u5024\u306e\u3069\u3061\u3089\u304b\u306bblank?\u3092\u6307\u5b9a\u3057\u30d6\u30ed\u30c3\u30af\u306e\u8fd4\u5024\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:ruby decode:true \">require 'active_support\/all'\r\n\r\nhash = { a:'1st', b:nil, c:'', d:'4th', e:true, f:[], g:'7th' }\r\n\r\np hash.reject { |k,v| v.blank? }<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">{:a=&gt;&quot;1st&quot;, :d=&gt;&quot;4th&quot;, :e=&gt;true, :g=&gt;&quot;7th&quot;}<\/pre>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001\u30cf\u30c3\u30b7\u30e5\u306e<span style=\"color: #0000ff\"><strong>\u5024v<\/strong><\/span>\u306b\u5bfe\u3057\u3066<span style=\"color: #339966\"><strong>blank?<\/strong><\/span>\u3092\u9069\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u7d50\u679c\u3001\u5b9f\u884c\u7d50\u679c\u3067\u306f\u3001\u30cf\u30c3\u30b7\u30e5\u306e<span style=\"color: #0000ff\"><strong>\u5024\u304cblank?\u3067true<\/strong><\/span>\u3068\u306a\u308b\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u306f\u3001\u30cf\u30c3\u30b7\u30e5\u304b\u3089\u53d6\u308a\u9664\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u914d\u5217\u306e\u5834\u5408\u3068\u9055\u3044\u3001\u30ad\u30fc\u3068\u5024\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u30cf\u30c3\u30b7\u30e5\u306breject\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u30d6\u30ed\u30c3\u30af\u306e\u6307\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u3001<span style=\"color: #339966\"><strong>Ruby<\/strong><\/span>\u306e<span style=\"color: #339966\"><strong>blank?\u3001present?\u3001nil?\u3001empty?<\/strong><\/span>\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\uff01<\/p>\n<p>\u5b66\u7fd2\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u632f\u308a\u8fd4\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<ul>\n<li><strong>blank?\u3001present?\u3001nil?\u3001empty?\u306b\u3088\u308a\u5024\u304c\u7a7a\u304b\u3069\u3046\u304b\u306e\u5224\u5b9a\u304c\u3067\u304d\u308b<\/strong><\/li>\n<li><strong>blank?\u3001present?\u306f\u3001active_support\u306egem\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u4f7f\u7528\u3067\u304d\u308b<\/strong><\/li>\n<li><strong>\u5f8c\u7f6eif\u3001\u5f8c\u7f6eunless\u3068blank?\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u898b\u901a\u3057\u306e\u826f\u3044\u30b3\u30fc\u30c9\u304c\u66f8\u3051\u308b<\/strong><\/li>\n<li><strong>reject\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066Array\u3068Hash\u304b\u3089blank?\u306a\u8981\u7d20\u3092\u53d6\u308a\u9664\u3051\u308b<\/strong><\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u306e\u5185\u5bb9\u3092\u518d\u78ba\u8a8d\u3057\u3001\u305c\u3072\u81ea\u5206\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u751f\u304b\u3057\u5b66\u7fd2\u3092\u9032\u3081\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01Web\u30b3\u30fc\u30c0\u30fc\u30fb\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u8c9d\u539f\uff08@touhicomu\uff09\u3067\u3059\u3002 \u4eca\u65e5\u306f\u3001Ruby\u306eblank?\u3001present?\u3001nil?\u3001empty?\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001 blank?\u3001present?\u3001 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":33403,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2352],"tags":[879,880,532,114,68],"class_list":["post-20752","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-study","tag-blank","tag-empty","tag-present","tag-ruby","tag-68"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\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.sejuku.net\/blog\/20752\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/20752\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-03T06:18:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:41:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/ruby_blank.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01\",\"datePublished\":\"2017-04-03T06:18:35+00:00\",\"dateModified\":\"2024-05-06T02:41:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752\"},\"wordCount\":235,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/ruby_blank.jpg\",\"keywords\":[\"blank\",\"empty\",\"present\",\"ruby\",\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\"],\"articleSection\":[\"Ruby\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752\",\"name\":\"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/ruby_blank.jpg\",\"datePublished\":\"2017-04-03T06:18:35+00:00\",\"dateModified\":\"2024-05-06T02:41:17+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/ruby_blank.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/ruby_blank.jpg\",\"width\":700,\"height\":400,\"caption\":\"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/20752#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\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.sejuku.net\/blog\/20752","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/20752","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"2017-04-03T06:18:35+00:00","article_modified_time":"2024-05-06T02:41:17+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/ruby_blank.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/20752#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/20752"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01","datePublished":"2017-04-03T06:18:35+00:00","dateModified":"2024-05-06T02:41:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/20752"},"wordCount":235,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/20752#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/ruby_blank.jpg","keywords":["blank","empty","present","ruby","\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0"],"articleSection":["Ruby\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/20752","url":"https:\/\/www.sejuku.net\/blog\/20752","name":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/20752#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/20752#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/ruby_blank.jpg","datePublished":"2017-04-03T06:18:35+00:00","dateModified":"2024-05-06T02:41:17+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/20752#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/20752"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/20752#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/ruby_blank.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/ruby_blank.jpg","width":700,"height":400,"caption":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/20752#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Ruby\u5165\u9580\u3011nil?empty?blank?present?\u306e\u57fa\u790e\u3068\u5fdc\u7528\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/20752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=20752"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/20752\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/33403"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=20752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=20752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=20752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}