Method: OData::Service#initialize

Defined in:
lib/odata/service.rb

#initialize(service_url, options = {}) ⇒ OData::Service

Opens the service based on the requested URL and adds the service to Registry

Parameters:

  • service_url (String)

    the URL to the desired OData service

  • options (Hash) (defaults to: {})

    options to pass to the service



16
17
18
19
20
21
# File 'lib/odata/service.rb', line 16

def initialize(service_url, options = {})
  @service_url = service_url
  @options = default_options.merge(options)
  OData::ServiceRegistry.add(self)
  self
end