class TypeFloat

Attributes

varname[RW]

Public Instance Methods

conversion_value(origin) click to toggle source
# File lib/ObjCGenerator/types.rb, line 98
def conversion_value origin
  "[#{origin} doubleValue]"
end
copyrow(newVarName) click to toggle source
# File lib/ObjCGenerator/types.rb, line 110
def copyrow newVarName
  "#{newVarName}.#{self.varname}  = self.#{self.varname};"
end
default_value() click to toggle source
# File lib/ObjCGenerator/types.rb, line 95
def default_value
  "0."
end
description_row() click to toggle source
# File lib/ObjCGenerator/types.rb, line 107
def description_row
  "@\"self.#{self.varname} = %lf\" , self.#{self.varname}"
end
hash_row() click to toggle source
# File lib/ObjCGenerator/types.rb, line 113
def hash_row
  "self.#{self.varname};" #is rounded
end
inEquality_test(other) click to toggle source
# File lib/ObjCGenerator/types.rb, line 104
def inEquality_test other
  "self.#{self.varname}  != #{other}.#{self.varname}"
end
property_definition() click to toggle source
# File lib/ObjCGenerator/types.rb, line 92
def property_definition
  "@property (nonatomic) double #{@varname};"
end
to_dictionary_item() click to toggle source
# File lib/ObjCGenerator/types.rb, line 101
def to_dictionary_item
  "@\"#{@varname}\" : @(self.#{@varname})  ?: @(0.)"
end