Sha256: 570ce16eb3f7780bf329250364bbe133642bfa778105c9d8c997a60c62b85624
Contents?: true
Size: 462 Bytes
Versions: 7
Compression:
Stored size: 462 Bytes
Contents
class Rack::CoreData::DataModel class Entity attr_reader :name, :attributes, :relationships 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 def to_s @name end end end
Version data entries
7 entries across 7 versions & 1 rubygems