Class: OData::AbstractSchema::Association
- Inherits:
-
SchemaObject
- Object
- SchemaObject
- OData::AbstractSchema::Association
- Defined in:
- lib/o_data/abstract_schema/association.rb
Direct Known Subclasses
Constant Summary collapse
- @@polymorphic_namespace_name =
'$polymorphic'
Instance Attribute Summary collapse
-
#from_end ⇒ Object
Returns the value of attribute from_end.
-
#to_end ⇒ Object
Returns the value of attribute to_end.
Attributes inherited from SchemaObject
Instance Method Summary collapse
- #FromEnd(*args) ⇒ Object
-
#initialize(schema, name, from_end_options = {}, to_end_options = {}) ⇒ Association
constructor
A new instance of Association.
- #inspect ⇒ Object
- #ToEnd(*args) ⇒ Object
Methods inherited from SchemaObject
#<=>, #plural_name, #qualified_name, #singular_name
Methods included from Comparable
Constructor Details
#initialize(schema, name, from_end_options = {}, to_end_options = {}) ⇒ Association
Returns a new instance of Association.
9 10 11 12 13 14 |
# File 'lib/o_data/abstract_schema/association.rb', line 9 def initialize(schema, name, = {}, = {}) super(schema, name) self.FromEnd(.delete(:entity_type), .delete(:return_type), .delete(:name), ) self.ToEnd(.delete(:entity_type), .delete(:return_type), .delete(:name), ) end |
Instance Attribute Details
#from_end ⇒ Object
Returns the value of attribute from_end.
7 8 9 |
# File 'lib/o_data/abstract_schema/association.rb', line 7 def from_end @from_end end |
#to_end ⇒ Object
Returns the value of attribute to_end.
7 8 9 |
# File 'lib/o_data/abstract_schema/association.rb', line 7 def to_end @to_end end |
Instance Method Details
#FromEnd(*args) ⇒ Object
16 17 18 |
# File 'lib/o_data/abstract_schema/association.rb', line 16 def FromEnd(*args) @from_end = End.new(self.schema, self, *args) end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/o_data/abstract_schema/association.rb', line 24 def inspect "#<< #{qualified_name.to_s}(#{[@from_end, @to_end].flatten.collect { |e| "#{e.name.to_s}: #{e.return_type.to_s}" }.join(", ")}) >>" end |