class FrOData::NavigationProperty

Attributes

name[R]
nullable[R]
partner[R]
type[R]

Public Class Methods

build(nav_property_xml) click to toggle source
# File lib/frodata/navigation_property.rb, line 22
def self.build(nav_property_xml)
  options = nav_property_xml.attributes.map do |name, attr|
    [name.downcase.to_sym, attr.value]
  end.to_h
  new(options)
end
new(options) click to toggle source
# File lib/frodata/navigation_property.rb, line 7
def initialize(options)
  @name     = options[:name] or raise ArgumentError, 'Name is required'
  @type     = options[:type] or raise ArgumentError, 'Type is required'
  @nullable = options[:nullable] || true
  @partner  = options[:partner]
end

Public Instance Methods

entity_type() click to toggle source
# File lib/frodata/navigation_property.rb, line 18
def entity_type
  @entity_type ||= type.split(/[()]/).last
end
nav_type() click to toggle source