Method: OData::Service#entity_sets

Defined in:
lib/odata/service.rb

#entity_setsObject

Returns a hash of EntitySet names keyed to their respective EntityType name



45
46
47
48
49
50
51
52
# File 'lib/odata/service.rb', line 45

def entity_sets
  @entity_sets ||= Hash[.xpath('//EntityContainer/EntitySet').collect {|entity|
    [
      entity.attributes['EntityType'].value.gsub("#{namespace}.", ''),
      entity.attributes['Name'].value
    ]
  }]
end