<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>murajun1978</author_name>
  <author_url>https://blog.hatena.ne.jp/murajun1978/</author_url>
  <blog_title>Murajun's Style</blog_title>
  <blog_url>https://murajun1978.hatenadiary.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>こんなメソッドを作ってみます require 'bigdecimal' Order = Struct.new(:sub_total) def total(order, tax) (BigDecimal(order.sub_total) * BigDecimal(tax.to_s)).ceil end order = Order.new(100) total(order, 1.08) # =&gt; 108 でも、これじゃ毎回消費税を渡さないといけないよね... 引数taxに初期値を設定してあげましょう require 'bigdecimal' Order = Struct.new(:sub_tota…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmurajun1978.hatenadiary.com%2Fentry%2F2014%2F09%2F21%2F193200&quot; title=&quot;Rubyで消費税の計算やってみたヘ(^o^)ノ - Murajun&amp;#39;s Style&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>2014-09-21 19:32:00</published>
  <title>Rubyで消費税の計算やってみたヘ(^o^)ノ</title>
  <type>rich</type>
  <url>https://murajun1978.hatenadiary.com/entry/2014/09/21/193200</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
