Class: RGovData::OdataDataSet
- Defined in:
- lib/rgovdata/service/dataset/odata_dataset.rb
Overview
This is the catalog class that describes an OData Service DataSet
Instance Attribute Summary
Attributes inherited from DataSet
#native_service, #options, #service
Instance Method Summary collapse
-
#attributes ⇒ Object
Returns the attribute names based on class meta-data => overrides RGovData::Dn.attributes.
-
#entity_name ⇒ Object
Returns the reated OData entity name for this DataSet TODO: currently, this is a hack, as ruby_odata doesn’t yet return the collection EntityType.
Methods inherited from DataSet
#attribute_value, #dataset_key, #initialize, #limit, #limit=, load_datasets, #meta_attributes, #native_instance, #realm, #records, #service_key, #uri
Methods included from Dn
#id, #initialization_hash, #meta_attributes, #records, #to_param, #to_s
Constructor Details
This class inherits a constructor from RGovData::DataSet
Instance Method Details
#attributes ⇒ Object
Returns the attribute names based on class meta-data
> overrides RGovData::Dn.attributes
6 7 8 |
# File 'lib/rgovdata/service/dataset/odata_dataset.rb', line 6 def attributes @attributes ||= native_service.[entity_name].keys end |
#entity_name ⇒ Object
Returns the reated OData entity name for this DataSet TODO: currently, this is a hack, as ruby_odata doesn’t yet return the collection EntityType
12 13 14 |
# File 'lib/rgovdata/service/dataset/odata_dataset.rb', line 12 def entity_name dataset_key.gsub(/Set$/,'') end |