Class: PropertyTypeFromRubyType

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

Instance Method Summary collapse

Methods inherited from PropertyType

#name, #parameter_type

Constructor Details

#initialize(name, sourceType) ⇒ PropertyTypeFromRubyType

Returns a new instance of PropertyTypeFromRubyType.



24
25
26
27
# File 'lib/metarecord/properties.rb', line 24

def initialize name, sourceType
  super name
  @sourceType = sourceType
end

Instance Method Details

#pass_by_const_reference?Boolean

Returns:



29
30
31
32
33
34
35
# File 'lib/metarecord/properties.rb', line 29

def pass_by_const_reference?
  if [Float, Integer, Fixnum, Bignum, Complex, Rational].include? @sourceType
    false
  else
    true
  end
end