1件ヒット
[1-1件を表示]
(0.028秒)
検索結果
-
BasicObject
# ! -> bool (139.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...