Class: RGovData::OdataService

Inherits:
Service
  • Object
show all
Defined in:
lib/rgovdata/service/odata_service.rb

Overview

This is the catalog class that describes an OData Service

Instance Attribute Summary

Attributes inherited from Service

#options

Instance Method Summary collapse

Methods inherited from Service

#credentialset, #datasets, #find, #get_dataset, get_instance, #initialize, #meta_attributes, #realm, #service_key, #transport, #type, #uri

Methods included from Dn

#attributes, #id, #initialization_hash, #meta_attributes, #records, #to_param, #to_s

Methods included from CommonConfig

#config, #require_config_file

Constructor Details

This class inherits a constructor from RGovData::Service

Instance Method Details

#dataset_keysObject

Returns an array of DataSets (keys) for the service



7
8
9
10
# File 'lib/rgovdata/service/odata_service.rb', line 7

def dataset_keys
  # @dataset_keys ||= native_instance.classes.keys
  @dataset_keys ||= native_instance.instance_variable_get(:@collections)
end

#native_instanceObject

Returns the native service object if applicable By default, returns self



14
15
16
# File 'lib/rgovdata/service/odata_service.rb', line 14

def native_instance
  @native_instance ||= load_service
end