Sha256: 30040140681f8daa98c55f83e1476fb91ff6b2dd0f6b48ff07203735f785af5d
Contents?: true
Size: 683 Bytes
Versions: 18
Compression:
Stored size: 683 Bytes
Contents
# encoding: UTF-8 module Spontaneous module Extensions module Object def blank? respond_to?(:empty?) ? empty? : !self end def full_const_get(name) list = name.split("::") list.shift if list.first.blank? obj = self list.each do |x| # This is required because const_get tries to look for constants in the # ancestor chain, but we only want constants that are HERE obj = obj.const_defined?(x) ? obj.const_get(x) : obj.const_missing(x) end obj end unless method_defined?(:full_const_get) end end end class Object include Spontaneous::Extensions::Object end
Version data entries
18 entries across 18 versions & 1 rubygems