るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.122秒)
トップページ > クエリ:i[x] > クエリ:j[x] > クエリ:display[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. matrix i

ライブラリ

クラス

検索結果

Object#display(out = $stdout) -> nil (27213.0)

オブジェクトを out に出力します。

...//emlist[][ruby]{
class Object
def display(out = $stdout)
out.write self
nil
end
end
//}

@param out 出力先のIOオブジェクトです。指定しない場合は標準出力に出力されます。
@return nil を返します。

//emlist[][ruby]{
Object.new.display #=> #<Object:0x...

test/unit (6018.0)

ユニットテストを行うためのライブラリです。

...してください。

* Test::Unit - Ruby用単体テストフレームワーク: https://test-unit.github.io/

なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実装し
ていましたが、上記のtest/unitと完全な互換性がある訳で...
...require 'test/unit'
require 'foo'

class TC_Foo < Test::Unit::TestCase
def setup
@obj = Foo.new
end

# def teardown
# end

def test_foo
assert_equal("foo", @obj.foo)
end
def test_bar
assert_equal("bar", @obj.bar)
e...
...s, 1 assertions, 1 failures, 0 errors, 0 skips

--name=test_barのような指定は行えません。

以下のようにすると help も表示されます。

$ ruby test_foo.rb --help
Usage: test_foo [options]
minitest options:
-h, --help Display this help....