Method: OData::Model::Configuration::ClassMethods#use_service

Defined in:
lib/odata/model/configuration.rb

#use_service(service_key) ⇒ nil

Define the service to use for the current OData::Model. This method will cause the service to be looked up in the OData::ServiceRegistry by the supplied key, so it can accept either the service’s URL or its namespace.

Parameters:

  • service URL or namespace

Returns:



45
46
47
48
# File 'lib/odata/model/configuration.rb', line 45

def use_service(service_key)
  odata_config[:service] = OData::ServiceRegistry[service_key.to_s]
  nil
end