Class: OData::Association
- Inherits:
-
Object
- Object
- OData::Association
- Defined in:
- lib/ruby_odata/association.rb
Overview
Internal class used to represent object associations
Instance Attribute Summary collapse
-
#from_role ⇒ Object
readonly
Returns the value of attribute from_role.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#relationship ⇒ Object
readonly
Returns the value of attribute relationship.
-
#to_role ⇒ Object
readonly
Returns the value of attribute to_role.
Instance Method Summary collapse
-
#initialize(nav_prop_element, edmx) ⇒ Association
constructor
A new instance of Association.
Constructor Details
#initialize(nav_prop_element, edmx) ⇒ Association
Returns a new instance of Association.
7 8 9 10 11 12 13 14 |
# File 'lib/ruby_odata/association.rb', line 7 def initialize(nav_prop_element, edmx) @edmx = edmx # Get the edm namespace because it varies by version edm_ns = @edmx.xpath("edmx:Edmx/edmx:DataServices/*", "edmx" => "http://schemas.microsoft.com/ado/2007/06/edmx").first.namespaces['xmlns'].to_s @edmx_namespaces = { "edmx" => "http://schemas.microsoft.com/ado/2007/06/edmx", "edm" => edm_ns } parse_nav_prop(nav_prop_element) end |
Instance Attribute Details
#from_role ⇒ Object (readonly)
Returns the value of attribute from_role.
5 6 7 |
# File 'lib/ruby_odata/association.rb', line 5 def from_role @from_role end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/ruby_odata/association.rb', line 5 def name @name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
5 6 7 |
# File 'lib/ruby_odata/association.rb', line 5 def namespace @namespace end |
#relationship ⇒ Object (readonly)
Returns the value of attribute relationship.
5 6 7 |
# File 'lib/ruby_odata/association.rb', line 5 def relationship @relationship end |
#to_role ⇒ Object (readonly)
Returns the value of attribute to_role.
5 6 7 |
# File 'lib/ruby_odata/association.rb', line 5 def to_role @to_role end |