Sha256: e0de78ee978cbb7c2e41617489edd834610b3940c402a17490d917700f87917c

Contents?: true

Size: 291 Bytes

Versions: 59

Compression:

Stored size: 291 Bytes

Contents

class Object
  # Get object's meta (ghost, eigenclass, singleton) class
  def metaclass
    class << self
      self
    end
  end

  # If class_eval is called on an object, add those methods to its metaclass
  def class_eval(*args, &block)
    metaclass.class_eval(*args, &block)
  end
end

Version data entries

59 entries across 56 versions & 18 rubygems

Version Path
p8-castronaut-0.6.1.1 vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb
relevance-castronaut-0.6.0 vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb
relevance-castronaut-0.6.1 vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb
relevance-castronaut-0.7.4 vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb
relevance-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb
activesupport_csi-2.3.5.p8 lib/active_support/core_ext/object/metaclass.rb
activesupport_csi-2.3.5.p7 lib/active_support/core_ext/object/metaclass.rb
activesupport_csi-2.3.5.p6 lib/active_support/core_ext/object/metaclass.rb
webroar-0.5.0 src/admin_panel/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.2.4 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.2.2 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.2.1 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.2 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.1.9 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.1.8 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.1.7 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.1.6 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
radiantcms-couchrest_model-0.1.5 vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
webroar-0.4.0 src/admin_panel/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
nbudin-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/object/metaclass.rb