るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.220秒)
トップページ > バージョン:2.6.0[x] > クエリ:_builtin[x] > クエリ:nil[x] > クラス:BasicObject[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

検索結果

BasicObject#! -> bool (24040.0)

オブジェクトを真偽値として評価し、その論理否定を返します。

...order < BasicObject
def initialize
@count = 0
end
attr_reader :count

def !
@count += 1
super
end
end

recorder = NegationRecorder.new
!recorder
!!!!!!!recorder
puts 'hoge' if !recorder

puts recorder.count #=> 3
//}

//emlist[例][ruby]{
class AnotherFalse < BasicObject
def...