Class: ObjectShadow

Inherits:
BasicObject
Includes:
InfoInspect, InstanceVariables, MethodIntrospection, Wrap
Defined in:
lib/object_shadow.rb,
lib/object_shadow/wrap.rb,
lib/object_shadow/version.rb,
lib/object_shadow/basic_object.rb,
lib/object_shadow/info_inspect.rb,
lib/object_shadow/object_method.rb,
lib/object_shadow/instance_variables.rb,
lib/object_shadow/method_introspection.rb

Defined Under Namespace

Modules: InfoInspect, InstanceVariables, MethodIntrospection, ObjectMethod, Wrap

Constant Summary collapse

VERSION =
"1.0.0"

Instance Attribute Summary

Attributes included from Wrap

#object

Instance Method Summary collapse

Methods included from InfoInspect

column100, #inspect

Methods included from MethodIntrospection

get_method, lookup_chain_for, #method, #method?, #method_lookup_chain, #method_scope, #methods, simple_lookup_chain_for

Methods included from InstanceVariables

#[], #[]=, #remove, #to_a, #to_h, #variable?, #variables

Methods included from Wrap

#initialize, #to_s

Instance Method Details

#classObject



4
5
6
# File 'lib/object_shadow/basic_object.rb', line 4

def class
  ::ObjectShadow
end

#instance_of?(other) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/object_shadow/basic_object.rb', line 12

def instance_of?(other)
  other == ::ObjectShadow
end

#is_a?(other) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/object_shadow/basic_object.rb', line 16

def is_a?(other)
  other.ancestors.include? ::ObjectShadow
end

#respond_to?(what) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/object_shadow/basic_object.rb', line 8

def respond_to?(what)
  ::ObjectShadow.instance_methods.include?(what)
end

#singleton_classObject



20
21
22
# File 'lib/object_shadow/basic_object.rb', line 20

def singleton_class
  class << self; self end
end