Sha256: 2317134ad9198819210fa3e2ec85a88d35cca1a84b2f42f3366a845193a94702
Contents?: true
Size: 486 Bytes
Versions: 1
Compression:
Stored size: 486 Bytes
Contents
module Ro module Klass module ClassMethods def klass(arg, *args, **kws, &block) return arg if arg.is_a?(self.class) && args.empty? && kws.empty? && block.nil? new(arg, *args, **kws, &block) end alias for klass end module InstanceMethods def klass self.class end end def Klass.included(other) other.send(:extend, ClassMethods) other.send(:include, InstanceMethods) super end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ro-4.2.0 | lib/ro/klass.rb |