Sha256: 8f6709d1d3046e8d15cb7e1a1814f8bd537bb424698dbb3f11eb03b8fb18a076
Contents?: true
Size: 434 Bytes
Versions: 3
Compression:
Stored size: 434 Bytes
Contents
class Object # returns whether this object is a clr_type. # if it has a CLR type in one of its ancestors def clr_type? self.class.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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
caricature-0.7.6 | lib/caricature/core_ext/object.rb |
caricature-0.7.5 | lib/caricature/core_ext/object.rb |
caricature-0.7.2 | lib/core_ext/object.rb |