Class: CaseClass::PlaceHolder
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- CaseClass::PlaceHolder
- Defined in:
- lib/case_class.rb
Instance Method Summary collapse
-
#initialize ⇒ PlaceHolder
constructor
A new instance of PlaceHolder.
Constructor Details
#initialize ⇒ PlaceHolder
Returns a new instance of PlaceHolder.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/case_class.rb', line 5 def initialize class << self def ==(obj) obj = obj.__getobj__ while PlaceHolder === obj class << self remove_method(:==) remove_method(:===) remove_method(:inspect) end __setobj__(obj) true end alias === == def inspect "_promise_" end end super(nil) end |