Module: ObjectShadow::Wrap
- Included in:
- ObjectShadow
- Defined in:
- lib/object_shadow/wrap.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #initialize(object) ⇒ Object
-
#to_s ⇒ Object
(also: #inspect)
Since shadows are not supposed to be passed around, to_s is left neutral.
Instance Attribute Details
#object ⇒ Object (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_s ⇒ Object 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 |