Module: OData::Model::Configuration

Extended by:
ActiveSupport::Concern
Included in:
OData::Model
Defined in:
lib/odata/model/configuration.rb

Overview

The OData::Model::Configuration module encapsulates all the functionality specifically needed for OData::Model to maintain internal configuration details about it’s relationship to the OData gem.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#odata_entityOData::Entity

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the entity the current model is associated with, or a fresh entity.

Returns:

  • (OData::Entity)


17
18
19
# File 'lib/odata/model/configuration.rb', line 17

def odata_entity
  @odata_entity ||= self.class.odata_service[odata_entity_set_name].new_entity
end

#odata_entity_setOData::EntitySet

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the OData::EntitySet the current model is related to.

Returns:

  • (OData::EntitySet)


32
33
34
# File 'lib/odata/model/configuration.rb', line 32

def odata_entity_set
  self.class.odata_entity_set
end

#odata_entity_set_nameString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the name of the OData::EntitySet the current model is related to.

Returns:

  • (String)


25
26
27
# File 'lib/odata/model/configuration.rb', line 25

def odata_entity_set_name
  self.class.odata_entity_set_name
end