class CoreData::DataModel::Entity
Attributes
attributes[R]
name[R]
relationships[R]
Public Class Methods
new(entity)
click to toggle source
# File lib/core_data/data_model/entity.rb, line 8 def initialize(entity) raise ArgumentError unless ::Nokogiri::XML::Element === entity @name = entity['name'] @attributes = entity.xpath('attribute').collect { |element| Attribute.new(element) } @relationships = entity.xpath('relationship').collect { |element| Relationship.new(element) } end
Public Instance Methods
to_s()
click to toggle source
# File lib/core_data/data_model/entity.rb, line 16 def to_s @name end