Class: Object::Not

Inherits:
Object show all
Defined in:
lib/thoughtful/object.rb

Instance Method Summary collapse

Constructor Details

#initialize(subject) ⇒ Not

Returns a new instance of Not.



21
22
23
# File 'lib/thoughtful/object.rb', line 21

def initialize(subject)
  @subject = subject
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &blk) ⇒ Object



25
26
27
# File 'lib/thoughtful/object.rb', line 25

def method_missing(sym, *args, &blk)
  @subject.send(sym,*args,&blk).__negate__
end