Sha256: dfc5ccb9fbdb74421f0fa1fde46386ce7e56e1e9201a3eb5c30625332c852043
Contents?: true
Size: 306 Bytes
Versions: 55
Compression:
Stored size: 306 Bytes
Contents
class Object define_method :not do Not.new(self) end class Not private *instance_methods.select { |m| m !~ /(^__|^\W|^binding$)/ } def initialize(subject) @subject = subject end def method_missing(sym, *args, &blk) !@subject.send(sym, *args, &blk) end end end
Version data entries
55 entries across 55 versions & 1 rubygems