Class: Object::Not

Inherits:
Object show all
Defined in:
lib/sugar-high/not.rb

Instance Method Summary collapse

Constructor Details

#initialize(subject) ⇒ Not

Returns a new instance of Not.



9
10
11
# File 'lib/sugar-high/not.rb', line 9

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



13
14
15
# File 'lib/sugar-high/not.rb', line 13

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