Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/metarecord/properties.rb

Instance Method Summary collapse

Instance Method Details

#to_property_type(parent) ⇒ Object



73
74
75
76
77
78
79
80
81
# File 'lib/metarecord/properties.rb', line 73

def to_property_type parent
  if self <= PropertyType
    self.new parent
  elsif parent.methods.include? :nativeTypeNameFor
    PropertyTypeFromRubyType.new parent.nativeTypeNameFor(self), self
  else
    throw "Cannot use Class as a property type parameter with a generator that doesn't implement nativeTypeNameFor"
  end
end