class OData::AbstractSchema::Association

Attributes

from_end[RW]
to_end[RW]

Public Class Methods

new(schema, name, from_end_options = {}, to_end_options = {}) click to toggle source
Calls superclass method
# File lib/o_data/abstract_schema/association.rb, line 9
def initialize(schema, name, from_end_options = {}, to_end_options = {})
  super(schema, name)

  self.FromEnd(from_end_options.delete(:entity_type), from_end_options.delete(:return_type), from_end_options.delete(:name), from_end_options)
  self.ToEnd(to_end_options.delete(:entity_type), to_end_options.delete(:return_type), to_end_options.delete(:name), to_end_options)
end

Public Instance Methods

FromEnd(*args) click to toggle source
# File lib/o_data/abstract_schema/association.rb, line 16
def FromEnd(*args)
  @from_end = End.new(self.schema, self, *args)
end
ToEnd(*args) click to toggle source
# File lib/o_data/abstract_schema/association.rb, line 20
def ToEnd(*args)
  @to_end = End.new(self.schema, self, *args)
end
inspect() click to toggle source
# 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