<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tanakaBox</author_name>
  <author_url>https://blog.hatena.ne.jp/tanakaBox/</author_url>
  <blog_title>ボクノス</blog_title>
  <blog_url>https://boxnos.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>前回のエントリでコマンドライン電卓dcを試したけど、Rubyワンライナの方が断然便利だった。 % ruby -e 'STDIN.each{|l| puts eval(l)}' 1 + 2 3残念ながらこのワンライナでは、 フォーマット指定が面倒 変数が使えない と、イマイチな所もあるので、書き直すことにした。 Ruby電卓rc #!/usr/bin/ruby require 'getoptlong' include Math opts = GetoptLong.new( [&quot;--format&quot;, &quot;-f&quot;, GetoptLong::REQUIRED_ARGUMENT], [&quot;--octal&quot;,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboxnos.hatenablog.com%2Fentry%2F20070826%2F1188066758&quot; title=&quot; Rubyで電卓作ってみた。 - ボクノス&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>2007-08-26 03:32:38</published>
  <title> Rubyで電卓作ってみた。</title>
  <type>rich</type>
  <url>https://boxnos.hatenablog.com/entry/20070826/1188066758</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
