Module: IdentifiesAs::ObjectInstance
Instance Method Summary collapse
-
#__identifies_as__!(*objects) ⇒ Object
(also: #identifies_as!)
Cause receiver to identify as specified objects.
-
#__identifies_as__?(object) ⇒ true, false
(also: #identifies_as?)
Query whether receiver identifies as specified object.
-
#__identities__ ⇒ Array<Object>
(also: #identities)
Identities that receiver identifies as, beyond those which it actually is.
-
#__stop_identifying_as__!(*objects) ⇒ Object
(also: #stop_identifying_as!)
Cause receiver to no longer identify as specified objects.
-
#is_a?(object) ⇒ Boolean
(also: #__is_a__?)
is_a? #.
Instance Method Details
#__identifies_as__!(*objects) ⇒ Object Also known as: identifies_as!
Cause receiver to identify as specified objects.
13 14 15 16 17 |
# File 'lib/identifies_as/object_instance.rb', line 13 def __identifies_as__!( *objects ) return ::IdentifiesAs.object_identifies_as!( self, *objects ) end |
#__identifies_as__?(object) ⇒ true, false Also known as: identifies_as?
Query whether receiver identifies as specified object.
28 29 30 31 32 |
# File 'lib/identifies_as/object_instance.rb', line 28 def __identifies_as__?( object ) return ::IdentifiesAs.object_identifies_as?( self, object ) end |
#__identities__ ⇒ Array<Object> Also known as: identities
Identities that receiver identifies as, beyond those which it actually is.
42 43 44 45 46 |
# File 'lib/identifies_as/object_instance.rb', line 42 def __identities__ return ::IdentifiesAs.object_identities( self ) end |
#__stop_identifying_as__!(*objects) ⇒ Object Also known as: stop_identifying_as!
Cause receiver to no longer identify as specified objects.
57 58 59 60 61 |
# File 'lib/identifies_as/object_instance.rb', line 57 def ( *objects ) return ::IdentifiesAs.( self, *objects ) end |
#is_a?(object) ⇒ Boolean Also known as: __is_a__?
is_a? #
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/identifies_as/object_instance.rb', line 69 def is_a?( object ) is_type = false if __actually_is_a__?( ::IdentifiesAs ) and __identifies_as__?( object ) is_type = true else is_type = super end return is_type end |