Module: SocialStream::Models::Supertype::InstanceMethods

Defined in:
lib/social_stream/models/supertype.rb

Instance Method Summary collapse

Instance Method Details

#subtype_instanceObject



28
29
30
31
32
33
# File 'lib/social_stream/models/supertype.rb', line 28

def subtype_instance
  if __send__("#{ self.class.subtypes_name }_type").present?      # if object_type.present?
    object_class = __send__("#{ self.class.subtypes_name }_type") #   object_class = object_type # => "Video"
    __send__ object_class.constantize.base_class.to_s.underscore  #   __send__ "document"
               end                                                # end
end