lib/odata/service.rb
# The OData Service's URL
The OData Service's URL
The OData Service ' s URL
def process_property_from_xml(property_xml)
      property_name = property_xml.attributes['Name'].value
      value_type = property_xml.attributes['Type'].value
      property_options = {}
      klass = ::OData::PropertyRegistry[value_type]
      if klass.nil? && value_type =~ /^#{namespace}\./
        type_name = value_type.gsub(/^#{namespace}\./, '')
        property = ::OData::ComplexType.new(name: type_name, service: self)
      elsif klass.nil?
        raise RuntimeError, "Unknown property type: #{value_type}"
      else
        property_options[:allows_nil] = false if property_xml.attributes['Nullable'] == 'false'
        property = klass.new(property_name, nil, property_options)
      end
      return [property_name, property]
    end
def process_property_from_xml ( property_xml ) property_name = property_xml . attributes [ 'Name' ] . value value_type = property_xml . attributes [ 'Type' ] . value property_options = { } klass = :: OData :: PropertyRegistry [ value_type ] if klass . nil? && value_type =~ / ^ #{ namespace } \. / type_name = value_type . gsub ( / ^ #{ namespace } \. / , '' ) property = :: OData :: ComplexType . new ( name : type_name , service : self ) elsif klass . nil? raise RuntimeError , "Unknown property type: #{value_type}" else property_options [ :allows_nil ] = false if property_xml . attributes [ 'Nullable' ] == 'false' property = klass . new ( property_name , nil , property_options ) end return [ property_name , property ] end
The OData Service's URL
The OData Service ' s URL
property_xml