{"id":485,"date":"2012-08-29T10:11:00","date_gmt":"2012-08-29T10:11:00","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/2012\/08\/29\/ruby-can-i-name-the-class-of-a-particular-variable-is-there-something-like-is_a\/"},"modified":"2012-08-29T10:11:00","modified_gmt":"2012-08-29T10:11:00","slug":"ruby-can-i-name-the-class-of-a-particular-variable-is-there-something-like-is_a","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2012\/08\/29\/ruby-can-i-name-the-class-of-a-particular-variable-is-there-something-like-is_a\/","title":{"rendered":"Ruby: can I name the class of a particular variable? is there something like &#8220;is_a?&#8221;?"},"content":{"rendered":"<p>\t\t\t\t<a href=\"http:\/\/stackoverflow.com\/questions\/5367114\/what-is-a-simple-elegant-way-in-ruby-to-tell-if-a-particular-variable-is-a-has#5367123\">What is a simple \/ elegant way in Ruby to tell if a particular variable is a Hash or an Array? &#8211; Stack Overflow<\/a><\/p>\n<p>The answer is of course: yes, you can.<br \/>\nAnd: yes, exactly.<\/p>\n<p>XmlSimple treats elements with attributes as <i>Hash<\/i>, w\/o attributes they are simply <i>String<\/i>.<\/p>\n<p>&#8220;googlecl-0.9.12 -&gt; googlecl-0.9.13&#8221; brought a change, where a specific element now does not have attributes any longer, and this broke my code, that reads &#8220;<span>google contacts list \u2026 &#8211;fields=xml<\/span>&#8220;.<\/p>\n<p>Solved one of my two urgent <i>home software<\/i> problems.\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a simple \/ elegant way in Ruby to tell if a particular variable is a Hash or an Array? &#8211; Stack Overflow The answer is of course: yes, you can. And: yes, exactly. XmlSimple treats elements with attributes as Hash, w\/o attributes they are simply String. &#8220;googlecl-0.9.12 -&gt; googlecl-0.9.13&#8221; brought a change, where [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-485","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-7P","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=485"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/485\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}