Top Level Namespace

Defined Under Namespace

Modules: ActiveOrient, ClassUtils, CustomClass, DatabaseUtils, ModelClass, OrientDB, OrientDbPrivate, OrientSupport, RestChange, RestCreate, RestDelete, RestOperations, RestRead Classes: Array, Date, E, Hash, Numeric, Object, String, Symbol, V

Instance Method Summary collapse

Instance Method Details

#preallocate_class_properties(o_class) ⇒ Object

If properties are allocated on class-level, they can be preinitialized using this method. This is disabled for now, because it does not seem nessesary


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rest_disabled.rb', line 7

def preallocate_class_properties o_class  # :nodoc:
  p= get_class_properties( o_class )['properties']
  unless p.nil? || p.blank?
    predefined_attributes = p.map do | property |
      [ property['name'] ,
      case property['type']
      when 'LINKMAP'
        Array.new
      when 'STRING'
        ''
      else
        nil
      end  ]
    end.to_h
  else
    {}
  end
end