<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>round-rand</author_name>
  <author_url>https://blog.hatena.ne.jp/round-rand/</author_url>
  <blog_title>ランドML</blog_title>
  <blog_url>https://ml-rand-note.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>最大値を取得する方法：max 最小値を取得する方法：min 最大値・最小値のインデックスを取得：index ・find_index オブジェクト型配列の場合：max_by・min_by ハッシュの場合 クラスの場合 参考 最大値を取得する方法：max 配列の最大値はmaxメソッドで取得できます。 ary = [1, 4, 0, 3, 2] p ary.max #=&gt; 4 最小値を取得する方法：min 配列の最小値はminメソッドで取得できます。 ary = [1, 4, 0, 3, 2] p ary.min #=&gt; 0 最大値・最小値のインデックスを取得：index ・find_index 最…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Farray-max-min-max_by-min_by&quot; title=&quot;【Ruby】配列の最大値・最小値を取得する(max, min, max_by, min_by) - ランドML&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>2026-07-29 00:00:00</published>
  <title>【Ruby】配列の最大値・最小値を取得する(max, min, max_by, min_by)</title>
  <type>rich</type>
  <url>https://ml-rand-note.hatenablog.com/entry/ruby/array-max-min-max_by-min_by</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
