lib/rails_erd/domain/entity.rb in rails-erd-1.4.7 vs lib/rails_erd/domain/entity.rb in rails-erd-1.5.0
- old
+ new
@@ -90,9 +90,13 @@
# Returns all child entities, if this is a generalized entity.
def children
@children ||= domain.specializations_by_entity_name(name).map(&:specialized)
end
+ def namespace
+ name.scan(/(.*)::.*/).dig(0,0)
+ end
+
def to_s # @private :nodoc:
name
end
def <=>(other) # @private :nodoc: