12件ヒット
[1-12件を表示]
(0.094秒)
別のキーワード
検索結果
-
Range
. new(first , last , exclude _ end = false) -> Range (25.0) -
first から last までの範囲オブジェクトを生成して返しま す。
...トの場合][ruby]{
require 'ipaddr'
Range.new(IPAddr.new("192.0.2.1"), IPAddr.new("192.0.2.3")).each {|ip| puts ip}
# => 192.0.2.1
# 192.0.2.2
# 192.0.2.3
//}
//emlist[例: 自作のオブジェクトの場合][ruby]{
MyInteger = Struct.new(:value) do
def succ
self.class.new(value + 1...