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
-
#odata_entity ⇒ OData::Entity
private
Returns the entity the current model is associated with, or a fresh entity.
-
#odata_entity_set ⇒ OData::EntitySet
private
Returns the OData::EntitySet the current model is related to.
-
#odata_entity_set_name ⇒ String
private
Returns the name of the OData::EntitySet the current model is related to.
Instance Method Details
#odata_entity ⇒ OData::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.
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_set ⇒ OData::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.
32 33 34 |
# File 'lib/odata/model/configuration.rb', line 32 def odata_entity_set self.class.odata_entity_set end |
#odata_entity_set_name ⇒ String
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.
25 26 27 |
# File 'lib/odata/model/configuration.rb', line 25 def odata_entity_set_name self.class.odata_entity_set_name end |