Sha256: c38645853deeefd2b22ca57fef2b9b4dfb3037d7775545e39377e34e9de673bc
Contents?: true
Size: 385 Bytes
Versions: 3
Compression:
Stored size: 385 Bytes
Contents
module Kernel # Easy access to an object's "special" class, # otherwise known as it's metaclass or singleton class. def own(&blk) (class << self; self; end).class_eval( &blk ) if blk return (class << self; self; end) end end # Maybe a little bonus feature? Shhh... don't tell Matz ;-) #class Module # public :attr, :attr_reader, :attr_writer, :attr_accessor #end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-1.4.0 | lib/facets/core/kernel/own.rb |
facets-1.4.1 | lib/facets/core/kernel/own.rb |
facets-1.4.2 | lib/facets/core/kernel/own.rb |