Sha256: 340c1c7c949f6d28348e59cdaa61c9d2944057faef7e9bef1b59ae46a28fbdfb
Contents?: true
Size: 440 Bytes
Versions: 9
Compression:
Stored size: 440 Bytes
Contents
class Object # returns whether this object is a clr_type. # if it has a CLR type in one of its ancestors def is_clr_type? self.class.is_clr_type? end # returns the clr type of this object if any def to_clr_type self.class.to_clr_type end # defines a class method on an object def define_cmethod(name, &blk) (class << self; self; end).instance_eval { define_method name, &blk } end end
Version data entries
9 entries across 9 versions & 2 rubygems