Top Level Namespace
Defined Under Namespace
Modules: ActiveOrient, ClassUtils, Conversions, CustomClass, DatabaseUtils, ModelClass, ModelRecord, OrientDB, OrientDbPrivate, OrientSupport, RestChange, RestCreate, RestDelete, RestOperations, RestRead Classes: Array, Date, DateTime, E, Hash, NilClass, Numeric, Object, String, Symbol, Time, V
Instance Method Summary collapse
-
#error(message, type = :standard, backtrace = nil) ⇒ Object
by just replacing Object#error method.
-
#preallocate_class_properties(o_class) ⇒ Object
If properties are allocated on class-level, they can be preinitialized using this method.
Instance Method Details
#error(message, type = :standard, backtrace = nil) ⇒ Object
by just replacing Object#error method.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/support/errors.rb', line 24 def error , type=:standard, backtrace=nil e = case type when :standard ActiveOrientOrient::Error.new when :args ActiveOrient::ArgumentError.new when :symbol ActiveOrient::SymbolError.new when :load AcitveOrient::LoadError.new when :server ActiveOrient::Error::ServerError.new end e.set_backtrace(backtrace) if backtrace raise e end |
#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 |