Module: ObjectShadow::Wrap

Included in:
ObjectShadow
Defined in:
lib/object_shadow/wrap.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



5
6
7
# File 'lib/object_shadow/wrap.rb', line 5

def object
  @object
end

Instance Method Details

#initialize(object) ⇒ Object



7
8
9
# File 'lib/object_shadow/wrap.rb', line 7

def initialize(object)
  @object = object
end

#to_sObject Also known as: inspect

Since shadows are not supposed to be passed around, to_s is left neutral



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

def to_s
  "#<ObjectShadow of #{object.inspect}>"
end