<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gom68</author_name>
  <author_url>https://blog.hatena.ne.jp/gom68/</author_url>
  <blog_title>gom68の日記</blog_title>
  <blog_url>https://gom.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>ruby</anon>
  </categories>
  <description>Rubyにもstruct があるということを教えてもらったので、早速使ってみる。 Struct って？ いわゆる構造体。語弊はあるけれど、メソッドの無いクラスのようなものと理解している。 Rubyの場合、Struct.new でstruct型のサブクラスを作り、それをさらにnewすると構造体が生成される。Struct.newで通常のclass定義を行い、その後にインスタンス作ってるような感じ。 1行で定義が書けてしまうのはいいなあ。 #!/usr/bin/env ruby #-*-coding:utf-8-*- hoge = Struct.new('Hoge', :foo, :bar, :ba…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgom.hatenablog.com%2Fentry%2F20090331%2F1238516224&quot; title=&quot; Struct - gom68の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-03-31 01:17:04</published>
  <title> Struct</title>
  <type>rich</type>
  <url>https://gom.hatenablog.com/entry/20090331/1238516224</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
