Class RailsERD::Domain::Specialization

  1. lib/rails_erd/domain/specialization.rb
Parent: Object

Describes the specialization of an entity. Specialized entites correspond to inheritance. In Rails, specialization is referred to as single table inheritance.

Methods

public instance

  1. inheritance?
  2. polymorphic?

Attributes

domain [R] The domain in which this specialization is defined.
generalized [R] The source entity.
specialized [R] The destination entity.

Public instance methods

inheritance? ()
[show source]
# File lib/rails_erd/domain/specialization.rb, line 45
      def inheritance?
        !polymorphic?
      end
polymorphic? ()
[show source]
# File lib/rails_erd/domain/specialization.rb, line 49
      def polymorphic?
        generalized.generalized?
      end